Friday, May 30, 2008

Learn to google

Google is one of those things which is so widely used it has become a verb by itself 'Just google it up'. It has become synonymous to internet searches just like when people want to buy tooth paste they'd say 'I'm going to go buy some colgate'. But did you know it's even a calculator, a currency converter, a dictionary of sorts? Well, look it up here and you'll find that you can use it for so much more.

Sunday, May 25, 2008

Develop it FAST!!!

I've always liked game programming. That's what got me to start programming in the first place. But even with all the current advancement in technology and tools I've never actually got round to making one to the finish. While idly stumbling I've found this interesting article entitled "How To Build a Game In A Week From Scratch With No Budget". That Jay Barson must be one heck of a talented fella to be able to pull of what he did. Takes a lot of experience to be able to tell which way down the road you need to go when you've got to get there quick. Anyhow, what I liked best about the article is the lessons he learned after finally having done it:
  • Lesson 10: Doing something like this really was worthwhile
    • I know what he means when he says "You wouldn't think that working on Yet Another Game would feel like a vacation, but it did." Sometimes I feel I need to do that too. After a long stretch on one project, you just need a short sprint on a smaller one to just revitalize yourself.
  • Lesson 9: Cutting features isn't always free
    • Sometimes we think it's better to not do something in a more holistic way, we don't need THAT much bells and whistle. But in the end sometimes not doing it that way makes it so much harder to do even small things and things start to become repetitive and error prone REAL fast.
  • Lesson 8: Do the important stuff first
    • "If I pretend that I only have those 8 hours to 'finish' the game, what could I do that would make the biggest difference in those 8 hours?". That's a good way of thinking what do we really have to do to make it work. Probably should apply to most of my projects too.
  • Lesson 7: Scope will expand to exceed your budget and schedule
    • LOL.. I do this a LOT.. :D "Every programmer I've ever met tends to underestimate the time required for him or her to complete a feature.". Ask my manager, he'd know.. ;)
  • Lesson 6: Get the game playable as fast as possible
    • I know I've always tried to get my projects up as soon as possible so that the clients can give feedback as soon as possible. Sure you have a list of features to implement, but sometimes when all is dark, a lone beacon in the distance can make all the difference.
  • Lesson 5: It's sometimes much faster to throw away old code and start over
    • Ahhh.. one of those things that makes working in the software industry seems so volatile. You can work on a set of feature for a whole week to find that the way you should have implemented it is different and you just throw away the whole weeks' work. But actually it's never thrown away. It's hidden deep in your consciousness on how you should implement it the next time.
  • Lesson 4: Python Rules!
    • I couldn't agree more.. :D
  • Lesson 3: Don't underestimate the art requirements
    • Oh yeah.. so many times I've implemented so many killer features only to find customers looking at the unmade up interface and say "where's the value added in this???". Huh!! It doesn't matter you can do this and that, if it's ugly I don't want it. Sadly I'm not a full fledged graphic artist though.
  • Lesson 2: I need to be more efficient in my use of time
    • "Better use of my time means I can get more done AND have more 'free time' to do other things". Oh, how true.
  • Lesson 1: IT CAN BE DONE
    • Yeah... :D

Saturday, May 24, 2008

Using clamav in fedora

Hmm.. I might have to try to scan a windoze comp for viruses later this afternoon. So thinking the best way to clean up the thing would be doing it from a linux boot and then scan it. First thing to pop up in my mind was "Hey, use the fedora usb drive you've got". So went scouring google for pointers on how best to use clamav under fedora and found one at: http://blogs.warwick.ac.uk/jrose/entry/using_clamav_in/.

Anyhow, to summarise it you have to install the clamav and clamav-update package. Edit /etc/freshclam.conf file. Comment the `Example` line and change the `db.XY.clamav.net` to `db.MY.clamav.net` or whatever your country code happens to be. Run `freshclam` (as root) to update the database and `clamscan -r --quiet /to/windows/partition/mount` to scan the windows mount. The --quite part is so that it'd list only those that have been found problematic so that you don't have to look for them with you bare naked eyes in the middle of thousands of lines of filenames. That should be it. Hope it works this afternoon.

Wednesday, May 21, 2008

The editor of a programmer

I think in every profession there is always a certain tool which is so important that the professional would have one very personal to his heart. He loves using it and would not think of using any other. For the chef would be his knife, for the samurai his katana, for the gamer his perfectly aligned customized and calibrated mouse (who on earth in his right mind would buy a 500 ringgit mouse???). But I consider myself a programmer and the tool close to my heart as a programmer is my editor. Oh how I love my editor, namely vim (please don't flame me, I like emacs too but don't use it anymore).

So while I was just idly surfing around looking for inspirations I bumped into this page entitled "Bill Joy's greatest gift to man" and it gives an interesting view on the origin of vi (vim's much revered parent). In the article in mentions "So the editor was optimized so that you could edit and feel productive when it was painting slower than you could think". We don't live in that kind of world now. Our computers could probably render 3d worlds faster than we can imagine them now, but still the feel productive part is essential. How productive? Look at Why, oh WHY, do those #?@! nutheads use vi? to understand. :D

Tuesday, May 20, 2008

vim colour scheme

Don't you just love the wide range of things you can customize with open source software. One of the things that some people really stick to is color schemes. Some like it light, others like it dark, even others like it pink :S.

Anyhow, whichever your preference is, it's nice to know you can change the color scheme of your favorite editor, vim. Just create the directory ~/.vim/colors and copy any color_scheme.vim file you find there (eg. tango, zen). Then restart vim and do a `:colorscheme name_of_color_scheme` or in gvim go to the edit->color scheme->name of color scheme menu. You can also add `colorscheme name_of_color_scheme` into your ~/.vimrc file to make it a permanent change everytime vim loads.

First hurdle

Lol... it's only been an hour of trying of fedora 9 and I have already stumbled into the first thing I have never had to face before, SELinux. I never had to face this problem on any of the distro's I've tried before (Namely because they didn't have SELinux installed on default). But as soon as I try to access my php project (which I checked out from svn, on a live usb disk... how coooool is that??? :D) it pops up saying that httpd is somehow violating it's policy by trying to access .htaccess (Huh??). Well, no biggie, just go to System->Administration->SELinux Mangement and change it to permissive (to turn it off requires a reboot, which I'm not willing to make) and the site works pretty well already. Man.. Now I can work on any computer I have access too.. But with lotsa RAM of course.. ;P

First taste of Fedora 9

Thanks to the constant persuasion by kagesenshi I finally tried out Fedora 9 as a Live USB Drive. And I am impressed. I haven't got any screen shots but the installation was way easy.
If you have access to a windows computer (shouldn't be a problem for the majority of people) go to lewk.org and download the liveusb-creator 2. The program can download the iso required by itself but I have already downloaded it earlier. Just select the iso and choose how much persistent overlay that you want.
Now here's the thing about the smart overlay. It is used by fedora to keep track of all the changes you made to your live USB so that your changes would be persistent. It's really nice. I tried installing inkscape after booting the usb and also saved a firefox bookmark. Both are still there when I rebooted again. Very nice.. :)
But the smart overlay is no longer available for your normal usb use. So I would suggest that you give enough smart overlay for you to install your required programs and settings and such but leave the rest so that you can save your files where it can be accessed normally as a usb disk. With the smart overlay of course you can save all your files to the normal home directory but you will not be able to access this home directory if you did not boot from the usb. Kinda defeat the purpose of being able to be access everywhere.
Haven't had the chance to extensively test it yet but so far I am very very impressed. Looking like another distro jump is possible in the near future... :P

Wednesday, May 7, 2008

Headaches of keeping up with standards

Ugh.. I haven't done any real top to bottom, beginning to end, full css tableless design for such a long time, I have forgotten how to do it. But here's a good place to start:
http://www.positioniseverything.net/articles/onetruelayout/

Haiya ala Solah