RSS

My Blog

How To Learn a Programming Language

August 16th, 2008

Many of my friends ask me how they should start out learning their first (or next) programming language.  Really, you can learn a programming language in many different ways.

1. Internet Tutorials - Internet tutorials are generally not the best way to get quality information about a certain programming language, but if you want a quick jump-start into a language these are great.  Also, some languages (mostly open-source languages) like Python and PHP have their own documentation that details the basics of the language.

2. Internet Videos - Internet videos are a great way to learn a language.  You can see hands-on how a programmer would go about writing a script/program, and you can even see some minor debugging (nobody is perfect - even the uber screencasters make syntax errors ;)).  Showmedo is an excellent website for this - though the main languages supported are only Python, Java, Javascript, Ruby, and Perl.. but there are many screencasting websites out there - use google.  (Or even youtube)

3. Printed Books - Honestly this is the best way to get quality information about a language.  It may not be the fastest in some cases (though if you pick up some cookbooks I find you can catch on quickly), but it is definitely the most accurate to the current language’s standards (assuming you get a fairly recently published book).

My learning process for a new language varies greatly but generally it goes something like this: I read the basic documentation, if any, or possibly some online tutorials.  I then look for any videos that might help.  Then I pick up a nice book on the language, and a refference (and/or a cookbook).  After reading/skimming the book, I now have a nice basis to get started on, and with my trusty refference book now at my side I can get to coding some simple applications.

Web Design Difficulties - 5 Ways to Get Inspiration

August 16th, 2008

Every Web Designer has experienced it on more than one occasion - the lack of inspiration for that next stunning design.  Whether you are swamped with projects and simply cannot focus, or you just have not designed in so long that you have lost motivation, these tips will work for you.

1. Take a break - When you are trying to create a new design for a client, there really is no point to staring at the computer screen watching your mouse draw boxes on the Photoshop canvas.  Take a break: exit out of Photoshop completely and do something else for a bit that allows your mind to open up.  Try going for a jog (or maybe a walk if you are not the running-inclined), or even playing a video game or watching television. The key here is to take your mind off of the fact that you are having a hard time coming up with a design.  Then, when you return to your favorite image editing program (do make sure to return), you will have a fresh mind.  Or, better yet, an idea will have already hit you when you were on the break!

2. Colors - Color is a big part of design.  So, instead of just sitting there, go find something colorful to look at.  It can be something physical like a painting or sculpture, or it can be something digital such as color sharing websites (like http://colourlovers.com and http://kuler.adobe.com/).  A nice thing about the latter is that those kind of websites usually allow you to download a pallet for Photoshop so you can quickly jump in and start playing around with the colors.  If you don’t like a certain pallet, just switch to another one - easy.

3. Start somewhere different - Instead of starting where you usually start, try something different.  If you usually start creating the logo first, begin by designing the general structure of the website.  Use different shapes to give you inspiration - try different rounded borders radii, try not using rounded borders.  If you usually start at the opposite end of the spectrum, try creating the logo first.  Start out with some basic text - maybe the website name or URL.  Then spice it up… would that ampersand look better as a different font?  Maybe you should use different colors separating different parts of the title?  Play with font styles and sizes.

4. Get new fonts/brushes - No designer can have enough fonts & Photoshop brushes. Go searching for new ones - download a whole directory of fonts and brushes and play around with them in Photoshop.  Brushes are a great way to give inspiration: pick a good brush at a decent size and start splatting it on the canvas.  You may be able to actually fit what you make into a design, but if you don’t you might find a good color contrast or an interesting effect.

5. Use other designers to your advantage - Web designers can be of great inspiration to each other, either directly or indirectly.  Go out and talk to other web designers on IM, in person, on the phone, on social networking websites, etc.  Let them know of your designer block - they will probably share similar experiences with you and how they overcame theirs.  If you are not feeling so socially inclined you can also go out and look at other website templates for motivation - but be careful, you don’t want to rip anybody off.

So use these tips to your advantage.  Let’s start with the first one - take a break!  Good luck.

Social Networking / Microblogging - Why I Use Twitter

August 10th, 2008

Ah.. Twitter.  I have never been a sucker for social networking (only to talk with some close friends on a not-so-frequent basis, really) due to one thing mainly - they take a lot of time to participate in.  However, Twitter completely goes against this rule by being extremely simple to use.  I had been messing around with this social networking tool for a while now, but only recently seriously signed up.  And I could not be happier about the web application.

One thing about things that are simple is that they also make it easier for you to spend more time on them.  This is a good thing for the developers of the app, but for people like me I have to watch the amount of procrastination generated from this simple little tool - after all, the one reason I came to twitter was that I could check any replies/direct messages I had over the last day, reply to anybody of interest in my feed, and/or tweet about my status in just a few minutes each day.  But I usually find that I get more and more distracted the longer I read up on my latest tweets - I find something interesting, maybe a link to a blog post or podcast, spend some more time viewing that item, then maybe tweet them back or comment on the item.

But Twitter really is a useful little tool.  I can SMS a Twitter bot for almost any need imaginable - and if there are no bots for that need, I can quickly make one up with the Twitter API.  This eliminates me needing multiple address book entries in my phone for each SMS service - want to check the weather?  Send a simple one-liner to a bot and get an answer fast.  Need traffic details - tweet.  Are you standing in a long line and need something to pass the time - tweet a game bot.  The list goes on.

Another great thing about Twitter is that if you follow a large amount of people, then just turn on SMS updating on the important people so your phone does not get bombarded by John Doe hanging upside down eating pizza or Joe Bloe checking out that cutie on the plane ride.  And if you are trying to concentrate, just send a quick message to Twitter and it will shut off SMS updates until you turn it back on.

Twitter can also be used as a marketing tool - people tend to listen more to marketing on Twitter than other social networking websites where it is consider spam.  (MySpace bulletins anybody?)  Just make a blog post?  “Check out my new blog on the PS3 grill: linkhere.com”

I will leave on one last note: feel free to follow my Twitter account.  @sonolin

PHP Frameworks - The Search

July 29th, 2008

Usually my programming done in PHP is done without a framework - I code everything manually.  I have some classes that I reuse so it does not get too tedious, but it still does not match the reusable code that a framework provides.  After plunging into Django a while back, my interest in frameworks in general has risen.  So now I am in search of my PHP framework.

I have worked with CakePHP in the past, but not much, and in general I quite like it.  I am now researching more into the Zend framework and Symfony PHP.  Only time will tell which one will come out as the winning framework (for my tastes).  When I finally pick the framework, I will write and let you know why I picked the one I did.

I am not saying that there is only one tool for every job.  I just would like to learn a framework that would help me in the most amount of areas, and then if another framework would better be suited for a certain job I could always switch.  I read a blog at one point where a Python programmer used three different Python template engines for his websites.. talk about diversity! :)

What are your experience in PHP frameworks?

What are your experiences with the different frameworks for PHP?  Which one is your favorite framework for general use?

RPG Project

July 26th, 2008

I am currently working on a browser-based RPG written in PHP.  I have not done much game development in the past, but I must say it is quite exciting - it is different from most of my usual projects.  The RPG is based around a different theme than I am used to.. it is not the usual swords and sorcery type RPG like you usually see nowadays.

One of the things I have found with game development is that prices and deadlines can change very fast depending on the client wanting different things in the particular game.  For example, maybe at the start the client wants a set amount of equipment in the RPG.  Since you do not expect this to change, you hard code it into the code, without using a database.  But then, what if the client changes his mind and wants different types of equipments, etc. etc.  This is a simple example but you can see the point I am making.

Game development projects are also quite interesting because bugs pop up in all sorts of places.  Say you are making a CMS for somebody - well, you have different points in the project where bugs can pop up, so you test thoroughly.  However, in a game it is difficult to test all the different points in the project because of the way games are designed - they are designed so that a player has to progress through certain stages, maybe finding secret levels or items, therefore making it difficult to find all the different places for a bug to hide.  But I just love this sort of challenge :)

What are your experiences in game development?

Let me know what your experiences are in game development.  Do you enjoy it or hate it?  Is it your main source of income?  What programming languages do you usually use?

Task Coach

July 23rd, 2008

So I came upon this really helpful tool named “Task Coach” the other day. The application is basically an open source “TODO” list written in the Python programming language. However, it is much more useful than ANY other todo list application I have seen. You can categorize your todos, you can put dates on them (due dates, start dates, completion dates), and (my favorite feature!) you can track the exact amount of time taken to do each todo.

For example, say I have a project named ‘Blog’. Well, this project has three subtasks - ‘admin’, ‘front-end’, and ‘design’. The ‘front-end’ could maybe also have subtasks for different plugins you want to incorporate, and other features, if you would like to go that detailed - but for simplicity’s sake let’s just stay with this structure. Well, say on day 1 I decide I would like to work on the admin. So I open up the blog todo tree and select “admin” and then click the button “Start Tracking Effort”. Some hours later I am finished, go back to Task Coach, and uncheck the button. Well, Task Coach just recorded the exact amount of time it took you to do that task! Very useful for ALL projects (not just hourly ones) to increase your productivity.

To install, visit http://www.taskcoach.org/ - they have installers for all major operating systems. However, on my Ubuntu installation I had to manually download the source because the DEB file wasn’t working properly - but that is no big deal at all as it is written in Python (you don’t even need to compile anything!).

IE6 In Vista

July 13th, 2008

I love linux. But I also love a lot of commercial apps that are difficult to run in a Linux environment. Due to this, I spend most of my time in Windows.

One of the downfalls of Vista is that there is no support for running IE6 natively on it. The average user is probably wondering why in the world one would want to use an outdated browser - do not ask me, ask the enormous amount of people still using IE6 out there (well.. Internet Explorer PERIOD).

Any Web Designer knows that Internet Explorer is not nice when it comes to rendering web pages. And what is even worse is that there are MANY differences in each of the IE versions. It is bad enough that we have to mutilate our beautiful CSS code to please IE, but we have to mutilate it even further for each IE version we would like to please.

I used to run Windows XP in a Virtual Machine (this is what Microsoft proposes you to do..) and use Tredosoft’s Multiple IEs to use IE3-6, then update to IE7 so I have all IE versions accessible. But this is tacky. I should not have to dedicate an entire Virtual Machine to another Windows installation just to run an outdated browser for testing my HTML pages. Thankfully, there is a better way - use colinux or andlinux as described by this blog post.

Wow Microsoft.. the most elegant solution I have found to run IE6 in Vista is to actually emulate linux which then emulates windows to run IE6. Do you have something against us Web Designers? :P

Ahh.. Wordpress

July 12th, 2008

I had my website redone a few months ago, giving it a cleaner design.  In doing so, I had taken out all functions of my previous portfolio website, including the blog.  I did not have much content in the blog, so I did not think much of it, but I needed to get my website up and running again.  I thought about making a CMS in Django (which really is great for CMSes), but when I thought of how much work that would be for what I wanted.. I instantly put off that idea and turned to my two favorite CMS open source alternatives - Joomla and Wordpress.  I thought about what I really needed for my website.. and truly I only needed some sort of front for my development, and did not really need a fully-functioning CMS.  I could get by with a blog, portfolio, and contact page.. there was no point in using a CMS as in-depth as Joomla for this.

About 5 minutes later, I now have my wordpress website up and functioning.  All I did was take my portfolio page, copy and paste the PHP code to get the entries from the default Wordpress template, pop that in my portfolio HTML page, then make a blank style.css (Wordpress complains if you do not have a CSS document in your theme directory.. and I would much rather use the one I was currently using in my /css directory), and voila a wordpress blog.