Saturday, June 7, 2008

Which "programming language" I have been dealing with for these days ? (Winter of 2008)

If you're interested in learning new technologies on programming languages and the global development environment you have to be fresh and robust.

Nowadays, i have fully concentrated my leisure time on learning new
programming languages that run the web. I was always asked "Which programming language is the best to learn?" by my friends and co-workers, i generally answer this kind of question like that: " If you only know one, then your in serious trouble" :)

This got me thinking on what programming languages should a programmer know to maximize his talent and marketability. Below is the top five languages that every programmer should know:


Ruby on Rails

Why you should learn it:
Cause it is the future. If you want to build a website writing only 8 lines of code Ruby on Rails(RoR) is the language for you. There has always been talk of Object Oriented Programming(OOP) and Ruby on Rails is OOP in its purest form.
Why it is not my first choice: Cause it is still in infancy and it does not have a debugger or a true IDE. Also its has a STEEP learning curve and its hard to understand how each component is put together, but all in all, it is the newest, most innovative one and very interesting with pure futures.
Resources: Top 12 Ruby on Rails Tutorials

My Tips to Become a Better Softare Developer just after the "Newbie" State


Today, at the line of retiring programming, i have tips to store for myself and should be helpful for new programmers and open minded (developers with the high improvement ability on work), these are formed in five steps;

Tip 1. Methodize... don't memorize

A programmer friend of mine use to always tell me how his memorization of over 200 function in C++ helped him greatly. "I never have too look up function definitions , therefore I can code 50% faster then the average coder!" he would brag. So what happened? Intellisense for one, two when C# came out all his diligence in memorizing functions went to waste. Of course in coding some memorization is a necessity but you should spend more time learning the method of doing things, i.e. creating a db connection, consuming a RSS feed, etc. then memorizing the code on how to do them. Learn the correct methods of doing thing, don't memorize.

Tip 2. Create your own Resource library

We all have a block of code that for some reason or another we have to look up. I can never remember the exact sequence of code to connect to a database. So every time I had to do this I would spend 10 minutes finding the book, looking up the link, etc. To combat this I created a word document that has snippets of code that I have trouble remembering for some reason or another. One of my colleagues creates a bookmarks of links, another stores all his in a email. What ever your method is its a good habit to keep that file close by . The point is that you should be building you knowledge base and you will find that it will greatly help you in coding better and faster.

Tip 3. Learn WHAT not HOW

A lot of junior programmers ask me "How do I do this, or How do I do that?" and I always ask them "What do you want to do?" and they stare at me like I am dating their mothers or somethings. This brings me to my next point, never learn How always know What you want to do. Example, lets say a programmer wanted to search a text file to see if it contains a certain word. This is HOW you would do it in C#:
string fileContent;
System.IO.FileStream myStream = new FileStream("c:\\aa.txt", FileMode.Open);
System.IO.StreamReader myStreamReader = new StreamReader(myStream);
fileContent = myStreamReader.ReadToEnd();
myStreamReader.Close();
int idx = fileContent.IndexOf("string");
if (idx)
{
return true
}

Now sure I could give him the code to do this but its more important to understand WHAT you are trying to do. In this example WHAT you want to do is:
1) Open a file
2) Read the file contents
3) Close the file
4) Search for string
5) If found output success message.

Breaking down the task in the manner does two things
1) it makes it language independent
2) it gives you a focus on WHAT needs to be done.
3) It makes your code more readable and usefull
Know WHAT you are trying to do makes the language you are trying to code it in inconsequential. Now it should be easy to create this code in C++, PHP, VB.NET, Ruby on Rails because you understand WHAT you need to do instead of HOW to do it.

Tip 4. Comment to match your style

Everybody coder hates commenting but in order to write quality/readable code every coder must comment. The problem most coders have is that they are always TOLD how to comment. Some companies want a comment on every line, others want a block of comment before every functions, others wants comments on difficult code blocks. I disagree with the policy and say that as long as the comments are usable, readable and useful then a coder should be able to comment in a format that works for him/her.For me commenting on every line breaks up my coding rhythm. I prefer to comment at the beginning of a functions listing step by step what I am going to do, then I referencing the steps as comment inside the functions. This works for me because it helps me organize my plan before I starting coding, its keeps me in rhythm as I don't have to stop coding to comment, and its help other readers read my code. Heres a example of how I comment:

/* 1. Open File
* 2. Read file into string
* 3. Close file
* 4. Search for key word
* 5. If fond return true;
*/
string fileContent;
//1.
System.IO.FileStream myStream = new FileStream("c:\\aa.txt", FileMode.Open);
System.IO.StreamReader myStreamReader = new StreamReader(myStream);
//2.
fileContent = myStreamReader.ReadToEnd();
//3.
myStreamReader.Close(); //4.
int idx = fileContent.IndexOf("string");
if (idx)
{
//5.
return true;
}

My point here is that this commenting style works for me and most programmers can read it with ease. Find a commenting style that works for you.

Tip 5. Master one...Learn another... but keep your eye on the next thing

Programmers sometimes email me and ask me what language should I learn, what is the best programming language to learn, etc. I you should at least master one programming language, be able to program fairly well in another and always, ALWAYS be on the look out for the next thing. Myself for example, I am great in C#, good in PHP and have been playing around with Ruby on Rails for the last month or two. Why do this? Well for one being a programmers is always about evolving. Evolving to write better code, evolving to find better ways of doing a task, always evolving ;)

Monday, April 7, 2008

How to enable Multiple start pages on Firefox

If you need to have multiple tabs as your start page like me, as a server address and google for instance, click on Tools and then in the Home Page field, use a pipe () between your http:// addresses.

Install Firefox Plugin View Source Chart to View Formatted Source

Instead of picking through html tags on long lines in source view, use the plugin with the name "View Source"to see how sites are structured at a glance.

Sunday, March 23, 2008

My Top 5 Freeware for Windows

We the Computer Engineer's all know that Firefox (Ahmet Salih's favorite for ITU's registirations) is pretty much the greatest free web browser known to man and that OpenOffice (Dogukan's favorite word processor for reporting) is a pretty decent open source alternative to the Microsoft Office suite … but those are obvious, right? What about all those sweet, free (as in food) software programs out there that no one’s really ever heard off? Don’t they deserve some love, too? Don't you want to get familiar with the tools that i have been using so much ?

Granted, a lot of the programs that get me excited are perhaps a bit obtuse, but let’s go with it. Without further adieu, here’s my short list for friends and beginners for programming containing 5 of the coolest unknown freeware for Windows (in no particular order for me :) )

1. PuTTY Connection Manager - DOWNLOAD

What?! You haven’t heard of PuTTY? It’s only the fastest, greatest, FREE terminal emulation client for Windows (for those of you who are freaked out by Unix terminals alone, much less ones ported to Windows, don’t worry - there are plenty of guides for why you’d use it and how to use it best).

(I’m sure there are plenty of people out there who prefer VanDyke’s SecureCRT, but it costs money, and being as I’m cheap, I don’t want to plunk down $99 for a program whose functionality PuTTY pretty much encapsulates)

However, there’s ONE thing that SecureCRT has that PuTTY doesn’t: tabs! Once you start administering several systems at once, you begin to get angry at how quickly those multiple terminal windows clog up your screen. For the longest time, I harbored envy of SecureCRT’s tabbed window that contained all terminal sessions in one screen … until I stumbled upon PuTTY Connection Manager.

This gem of a program “swallows” instances of PuTTY into one tabbed screen, complete with direct access to PuTTY’s native connection management screen and a tree-style list of all servers you currently have setup. Couple the bookmarks features and the Quick Connect options, and this program (which is still in beta) is looking pretty sweet next to commercial variants.

2. SyncBack - DOWNLOAD

Like most people, I never really thought about backing up anything on my hard drive. Then it happened - I remember I had to Photoshop some large project for a class and with the deadline looming, the power went out at my house. And I hadn’t saved a thing. And don’t even talk to me about about having a reliable UPS (see above mention of my “cheapness”). It was in those frustration-induced moments that I decided I needed to do a little backup.

Being a fan of freeware, I immediately Google’d for freeware backup utilities, and after trying a few (rather inadequate) ones, I found the free Community edition of SyncBack. This app still blows me away - the myriad of features it contains - synchronization/backup, FTP, ZIPing, and profiling, to name a few - is just unbelievable and should satisfy any personal backup you might need. Be sure to check out the sweet guide on SyncBack by Gina over at Lifehacker.

P.S: there’s a Enterprise version of SyncBack, but I can’t really see what I would need it for - check it out, though, because it might fit a need of yours that the Community edition doesn’t)

3. Belvedere - DOWNLOAD

So, being a computer scientist, I’ve taken it upon myself to be familiar with all types of computers - which is a snazzy way for me to justify being both a Mac user and a PC user. Some time ago, I ran across an awesome program for the Mac called Hazel, a rule-based program designed to keep files on your computer in order. Want your downloads folder - where you dump everything you download in Firefox - cleaned every week? Hazel can do it. Want any screenshots you take to automatically be placed in your Pictures folder? Hazel can do that, too.

Needless to say, this awesome experience immediately had me searching for a Windows equivalent. And what did I find? Nothing! I resigned myself to existing in an unorganized PC landscape for the rest of my days.

This last January, Adam at Lifehacker rode to the rescue with Belvedere, his attempt to create a direct clone of Hazel for Windows. While it doesn’t contain exactly the same functionality as Hazel (yet!), it has rules for modifying, deleting, moving, and otherwise heckling files that fit certain criteria. Given that I have folders all over my PC accumulating with junk, Belvedere is a set-it-and-leave-it app that ensures crud gets moved where it needs to go on a regular basis.

4. VirtuaWin - DOWNLOAD

Oh boy, I am a sucker for screen real estate. I just recently got myself a second monitor, and frankly, I don’t know how I ever lived without one. But it gets better - the other day, I saw a system administrator friend of mine using Linux’s virtual desktops with a dual monitor (in case you don’t know what virtual desktops are, check out this Wikipedia page on the subject). With 4 virtual desktops, his computer basically had 8 screens worth of information. 8!

Now, I would love to switch to Linux full time, but there are a lot of things on Windows that I need … but Windows doesn’t come with virtual desktops out of the box (the Microsoft PowerToys group has a virtual desktop implementation, but it’s nasty-slow). Once again, Google to the rescue: Sourceforge-hosted VirtuaWin was the answer.

This guy is lightning fast, and the FAQ on the site has tips for speeding it up under Windows. Add that to the fact that you can instantly switch to different virtual desktops (via mouse click, mouse movement, or hotkey), move windows between desktops, and create default application sets, and this is one sweet application for people starved for desktop space.

5. Komodo Edit - DOWNLOAD

This is one of those programs where you go, “How in the world is this free??”

Web development was one of my favorite areas for CE - I’m always on the lookout for tools that will help me get the job done better and faster (and are for free!).

Now, for a long time, I’ve been envious of Komodo IDE, what with its debugging qualities, DOM viewer, and code browsing. Unfortunately, it costs $$$, so it’s out the window.


But behold! ActiveState has a smaller, parred-down version of Komodo IDE for free! Komodo Edit only has three of Komodo IDE’s main features - editing multiple languages, project managers, and general toolbox - but I find that those are plenty. My favorite feature? Code completion for functions I’ve written

What about you guys? Any freeware for Windows we should know about? Hit us up below.