RSS

Monthly Archives: July 2013

5 programming Languages I would advice to Learn

This list is purely based on my personal experience as a coder,these are primarily the code languages that I have been asked to demonstrate,develop in or mentor.

1.Java
java_code_generation_big

 

Java certainly has its critics, not to mention some well-publicized security issues. I believe they still tech this language in Campo, can’t possibly hurt that Google uses Java as the basis for Android application development, a sector that isn’t likely to slowdown anytime soon.

2.Python

calculator-python-code1

Python is a general purpose programming language that can be used in a variety of ways. Known for its clean and efficient code, Python is used by players as notable as Google and NASA. It’s also what Dropbox is written in. In fact, the technology is so important to Dropbox that the company hired Python author Guido van Rossum away from Google late last year.

3.PHP

phpCodeEditor

 PHP is huge. The open source, server-side scripting language runs on more than 20 million websites and powers high-profile sites we deal with every day, including Facebook and Wikipedia. Any blog, news site or other website built using WordPress or Drupal is making use of PHP as well. It’s all over the Web, even if you can’t see it by clicking “view source.”

4.Ruby

syn_color_IR_White.example_ruby

I don’t have a lot of working knowledge of Ruby,I started learning it 2 weeks ago ( see here). However It may be almost 20 years old, but the object-oriented scripting language is still going strong. After existing for years as a general purpose programming language, Ruby got a huge bump from the advent of Ruby on Rails, the hyper-popular Web development framework. Since the rise of Rails, the two have practically become synonymous, but Ruby has plenty of applications as a general scripting language

5.Objective C

sampleMemberCode

It’s the core of development for both of Apple’s operating systems. Its roots in Mac OS X go back to Steve Jobs’ days at NeXT and it’s at the heart of iOS and all their apps. If you are interested into going this way Then this is a language I would suggest you pursue

Advertisements
 
2 Comments

Posted by on July 17, 2013 in Uncategorized

 

Tags: , , , , ,

So begineth me and Ruby on Rails

Wait before I begin this code stuff, I was just  playing Let Nas Down off that Born Sinner album….all I can say this some epic music…best line he says “Long live the idols may they never be your rivals,pac was like Jesus,Nas wrote the bible”  Then thanx to @TayianC I got the rmx to it where Nas replies to J cole…. Story for another day lakini…. Back to code

1883857_orig

As I blogged here last week >> am learning ROR (Ruby on Rails) from scratch…with mentorship from some of the best ROR coders In Kenya. The first step is always setting up the environment,and trust me you don’t want to be that guy going at a pro  “how do I set up Ruby on rails on my machine”..so Had to do it myself…hit the usual stumbling blocks and decided to write this to help anyone who will go through the same:

First  my environment Fedora 17 GNOME on 6GB RAM, Core i5. That being said,I tried setup the  old fashioned way

sudo yum install ruby
sudo yum install rubygems
gem install rails

Screenshot from 2013-07-08 09:53:09

But the problem with doing it that was is I could not install some gems (rails,sqlite or mysql)

Screenshot from 2013-07-08 12:42:42

So after some research and asking around I got to learn that I should do this setup using RVM ….so here is how I did it

First install  the prerequisites

sudo yum install git-core curl make bzip2 gcc-c++ patch readline readline-devel zlib zlib-devel libyaml-devel libffi-devel libxslt-devel sqlite sqlite-devel openssl openssl-devel

We are now ready to install RVM:

bash -s stable < <(curl -s https://raw.github.com/wayneeseguin/rvm/master/binscripts/rvm-installer)

…followed by,

echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc

Finally, reload your .bashrc file with the following command:

. .bashrc

Ensure that RVM is loaded with the following command, which should output “rvm is a function”:

type rvm | head -1

The following steps will install Ruby, Rails and the Sqlite3 gem. Execute these in order:

first,

rvm install 1.9.3

then…

rvm use 1.9.3 --default

Screenshot from 2013-07-08 12:12:23

followed by…

gem install rails

Screenshot from 2013-07-08 12:30:57

…and finally,

gem install sqlite3

Screenshot from 2013-07-08 12:40:07

 

And Viola you have Ruby,rails and sqlite setup (if you are planning on using MYSQL then you can as well install it instead of sqlite)

 
3 Comments

Posted by on July 8, 2013 in Uncategorized

 

Tags: , ,

Why my next project will run on RUBY and not PHP

We have this thing we do with a few close programmer friends of mine….we never recycle the programming language if we can help it. Unless the project scope is identical,we always try to do it in another language. So far this has seen me learn a few cool languages (Python was the best one). So this time round….its ruby time…the gems be calling.

ruby-on-rails

So why Ruby over the already known PHP,In a technical level, it beats PHP hands down. The same way as Python or Java also do. But from a cultural stand point and simple plain inertia, PHP still is the champion of the web.

PHP was made in the right time with the right set of features. Easier than C/C++ CGI. Easier to learn than Perl with its plethora of options. Python and Ruby wasn’t ready for that and few people knew about them. Java was not ready for prime time for the internet. ASP was not created. .NET was not created. Right place at the right time. Hard to beat that.

But PHP is showing its age. Sure, caching systems and lots of other tools can help it survive longer, but PHP was never meant to serve as a platform. You can’t possibly write an application server for PHP the same way you can with Java. You can’t have long lasting PHP processes because of how much it leaks. So the only possible architecture for PHP is to kill it off every once in a while and reload everything again later. And the bigger the framework, the longer it will take to respawn a PHP process.

The promised Facebook/PHP (HipHop for PHP)  was never actually released to the public. Quercus (PHP in Java) never became mainstream. So PHP is stuck with web pages. And the simpler the better.

Ruby (and Python, and Perl, similarly), were designed as general purpose languages. You do can build TCP servers, you can leverage OS level libraries such as libevent for highly concurrent connections. You can build web application servers. You can build message queueing systems. You can build desktop applications. You can build long lasting processes, even though Ruby still only has a rudimentary garbage collector (compared to Java or .NET).

And yes, it does surpass PHP for web development. But nothing comes for free and I don’t believe in free lunches as well. Of course, it is much more demanding for the programmer. You do have to have your computer science in check here. With PHP and the LAMP stack you just copy and paste some random code, press F5 to reload the browser and you’re good to go.

With more complex frameworks, it helps if you know what’s going on underneath. You do need to know real OOP. You do need to understand at least the basics of functional programming if you really want to take advantage of the language. There are tons of different libraries to learn.

So it is not easy. But I think that if you do like the career of programming, you should seriously look outside of your little box and earn many different languages to get your work done, Ruby being one of them (but not the only other one).

 
Leave a comment

Posted by on July 1, 2013 in Uncategorized