LOG: Step 1 of world domination
Sunday, February 03, 2013


After years of mindless wandering, I've finally decided to put my skills to the test. Everything that I've learnt will be used in order to make this work.

I am going to create a web portal that allows me to access and control every aspect of my home network, from the scratch. Sure, I could always use a corporate solution, or even using home server solutions. But where's the fun in that?

There are 5 main functions that I'm interested in for the moment.
LOGS: Display logs from selected devices. (routers mainly, SNMP)
COMPUTERS: Manage my computers. Remotely boot up/shutdown, remote desktop and ssh access
ROUTERS: Well... just the management page for it
FILES: Access files from any device. (mainly the NAS)
BACKUPS: Scheduled backups to NAS. Summary/management

Draft of what it might look like

Sure, I could simply use Windows Home Server to do most of the stuffs I'm going to do. Why not do that?

For one, I must have a decently powerful computer turned on at all times. That sucks up electricity and is probably idle most of the time, terrible for efficiency. Whereas I could host this web portal on my router, which takes up maybe 4 Watts or less of electricity.

Trying to implement proper security all of these will also be an interesting problem to tackle.

Again, the question people always ask me is
"Why?"
It's a little hard to explain when it comes to computers. Think of it this way, people train very hard to play instruments properly. They learn some tough pieces to challenge themselves, or maybe because they love that piece. Or that people in sports train their body to perfection, because they want to be better at it, that it's challenging.

This is a challenge to myself. It may not seem intuitive to many people, but that's how I view my interactions with computers. I love what I can do with it, and I want to get better at it. For the years of learning I haven't really had anything substantial to show for myself. Sure, a couple of neat tricks here and there, but nothing as big as this.

Let's see how much I have progressed over the years, shan't we?

Labels: , , , , , ,


FYP: SP Food application
Wednesday, January 09, 2013


I realized that I haven't written about my Final Year Project yet, seeing how I was just working on it just now, it's probably good to put it down on my blog.

We're making a Food mobile app that allows people to view all the food available in Singapore Polytechnic. So you're able to easy browse through what food is available, with all the pricing available. There is a heck lot to expand on, but we're just trying to get the basic functions down first.


As you can see, it's running in a browser. Which is the whole point of this project. To create a mobile application using HTML5. To put it in simpler words, we're trying to create a mobile application using web technologies.

Why?
So it could run virtually anywhere. It'll be able to run on iPhones, Androids, Blackberries or any arbitrary device that has a browser.

The difficulty? HTML5 is an emerging technology, even though it has been around for a couple of years, the standards aren't fully finalized yet. Everything we're trying to do here is pretty much on the bleeding edge of web technologies.

Offline databases is something that is currently implemented awkwardly. Half of the devices do it one way, and the other half do it another way. So we pretty much gave up and do it the online way instead. (it is the interweb after all)

In case you're wondering, the HGW stands for hungry go where. Which is kind of a blatant copyright infringement but we're not really planning to upload to the store and it'll only stick around until we've finished presenting it. Unless the school is interested in keeping it, then we'll rebrand it or something.

So HGW is just a button you press on, that randomly picks a food and tells you where to find it. Perfect for those fickle minded wimps who don''t know where to eat.

We've just finished setting up the database and is all set and primed for importing all our data. The hardest part right now is learning how to access it. I really don't wanna rewrite the code, I hope I won't have to. We will try to implement a rating system once we're done with all of this. We'll see...
*we = me and another dude. 2 man team, le sigh.

Everything aside, I am rather impressed by myself.
There's another project that requires us (another team) to create a Windows Application and connect to a SQL database. It doesn't seem that hard now but we'll see how it goes!

Hopefully we'll be able to complete this in time. The next update will probably when we manage to fix all the bugs!

Labels: , , , ,


Unlock routing powers with OpenWrt
Wednesday, August 29, 2012

I'm running a really complicated network in my house. 

Surprisingly, the reason is not "Because I can" this time round. It's more of, I screwed up and it just ended up like this. Since everything is working fine, I didn't bother optimizing it due to the lack of time. (thanks exams!)

Since words are really not helpful in this situation, I shall make a simple diagram to illustrate my network. (I feel paranoid and insecure doing this, I pray the hackers stay away from me)


R1 ~ R3 refers to routers. (yes I am using 3)
SSID refers to the name of the wireless network
The grey dotted line is a wireless bridge between 2 routers
My NAS is connected to R3

What I ended up doing is actually quite interesting. It is stupid, but it's amusingly secure somehow. Now, all 3 of my routers are on separate networks. How the fuck? Because I treat each link from the router as a WAN connection. That means that each router thinks that it is directly connected to the internet. Which, is only true for R1.

What do I end up with? R1 is unable to access R2 or R3. R2 is able to access R1 but not R3. R3 is able to access both R2 and R1. Interesting right? Well, I am on R3. I could give my friends access to R2 or R1, using it as guests networks and it will be totally separated from me.

This also means that technically, I am behind 3 physical firewalls. Because I am actually triple NAT-ing my network. It might seem really stupid to the real geeks out there but well, I really don't know if this is ingenius or full retard.

To make this work, your normal home routers with their default software probably couldn't make such an interesting configuration work.

Introducing, OpenWrt.

What is OpenWrt?
OpenWrt is described as a Linux distribution for embedded devices.
Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developer, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for full customization, to use the device in ways never envisioned.



It's relatively easy to flash a the Linux firmware onto your router. The hard part comes when you have to telnet/ssh into it and do a bunch of command line stuffs to get your web interface working. (I'm too noob to work solely in CLI) Of course, this is relatively advanced stuffs. Even I don't know half the settings that exists on the software. So if you want to mess around with your own hardware, do it at your own risk. As usual read the fucking manual and make sure you have a plan B in case something fucks up.

Many of the supported routers are not exactly stable per say, so please read carefully. I recently bought a TP-LINK WDR4300 and I think I haven't wrote about it yet. But it was relatively buggy with the first few OpenWrt firmwares and I had to power cycle it often. However, after switching to OpenWrt Attitude Adjustment r33276 / LuCI Trunk (trunk+svn9138) today, the connection is more stable and I didn't have to mess around with it anymore. My other TP-LINK 2543ND has been up and running for 5.5days without any hiccups at all.

Alright, how is the performance? I just took a test from www.speedtest.net
(R2 has been running for 13hours)


My connection is 100mbps. Using the direct wireless I could achieve roughly 60+mbps (due to overhead and whatnot). So my connection at R3 is about 60~70% of my maximum wireless throughput. Which is not bad, considering my location and overhead wireless has. Though technically this is only 36% of my total available bandwidth. However, since my wireless bridge link is my limiting speed, I could achieve average 3MB/s downloads, and bursts of up to 4.5MB/s.

I also ran a pinging test from R3 to R1 for about a minute or so, the average latency is about 7ms, with a minimum of 2ms and maximum of 28ms. Which is good enough for gaming.

Well, it's good enough for now. I will still continue to work on this little project and improve my networking skills over the holidays. There's still Dynamic DNS and VPN to set up. This is going to be one hell of a fun thing to experiment on.

Labels: , , , , ,


Excel: Finance charting
Monday, June 25, 2012



Okay, you know about how I've been working on charting down all my expenditure? I wrote this about 3 weeks ago. Since then I've looked through my chart and realized there's a better way to visualize the data.

Before I continue, let me say that this is not a pointless post. 

Because I made this for you guys.
Finance.xlsx

I made it using Microsoft Excel 2010. I'm not sure if there are any compatibility issues but it should at least work with 2007 version.

Let me show you how it looks like when you have data in it.



Of course I just punched in random numbers to show you how it works.

All you need to do is to type in your monthly budget, and it will calculate the rest of the stuffs for you. Of course, you will need to type in your daily spending for this to work/make sense.

When you overspend your daily budget, it will turn red. Making it easier for you to spot which days you spend more on. I also included weekly total and average spending. Then amount saved after that.

Beside Total and Saved, I added a change in %. The way it calculates is that it compares the previous week to the current week. The change in amount you save/spend will be represented in % that will change to green or red depending on whether you save or spend more.

Under the Summary tab below, you can find graphs for weekly average/total. Along with total monthly spending and saving.

I started from May to December. Because well, I'll do the full year next year, there just isn't a point for me to do it right now. On that regard, I'm sorry. Though it's really not that hard to extend it yourself when you need to next time.

There's a couple of weird quirks with the file I made.
1. The graph will plot in the $0. I don't know how to remove it. But I made the graph just to give a visual representation and not something that you can get fine details from.
2. When change in % is too huge, it will appear something like ######. Nothing much, it's just that there isn't enough space for it to display the number. Simply widen the cell and you can see the number again.

Apart from that, this is a very simple and efficient finance charting/planning excel file for students.

This is my first time doing such extensive excel stuffs. I'm sure I got all the formulas down correctly so there shouldn't be any problems. But man, this is pretty hard work. Either way, I'm quite happy with it as I've manged to learn the basics of excel.

Anyway, give it a try and see if you like it. 

This is the Lord, signing off! 

Labels: , , , , , , , ,


Little Awesome Things
Monday, April 16, 2012

HELLO PEOPLE.

I'm going to try another project about blogging, once again. Is it going to work? I don't know, but at least this time it wouldn't fail from the lack of posts, because I'll be using tumblr.

http://littleawesomethings.tumblr.com

If you want to contribute to it, tell me using whatever ways you know of. I'll give you an email, which you could post directly to it. If emailing is too hard for you, then you could simply go to.

http://littleawesomethings.tumblr.com/submit

Write about something awesome, and click submit! It might take awhile for it to get up there cause I'll have have to click okay and stuffs, but you get the idea.

What is Little Awesome Things about?

It's about the little things in life that counts. The little little things that makes you happy. For example, this morning, I woke up 5 mins before my alarm, and I felt refreshed. It brightened up my day, in it's own tiny little ways. I want to collect all the little things in life that makes people happy.

What's the point of this?

When I'm feeling down, I want to have a place to go to, to remind myself that sometimes it's not the big things in life that makes all the difference. Sometimes, it's just the tiny things that lights a smile on your face. I want to bring that feeling to other people too!

Maybe a month or two down the road, I could read back on all the posts, smiling about the little awesome things that made me happy.



Hopefully it'll succeed this time. As they said, the third time is the charm.

Labels: , , , , , , , , , ,