Friday, November 30, 2012
Fixing a Problem
As humongous or diminutive as problems might be I believe that the solutions to them come about by chipping away at the issue in a very incremental manner. It just takes time and a fair amount of consistency, but eventually the problem will dissolve.
But what about this case - what do you do in a case where the solution to the problem is so simple, yet the people for whom you are solving the problem are too paranoid and distrusting for them to even dip their toe in the solution unless they see someone else drinking the proverbial Kool-Aid first? What do you do then? What becomes of the problem? Can it still be classified as a problem since nobody seems to want it solved or everybody balks at the presented solution?
There is a culture in my country that says no solution (or product in a general sense of the word) is any good unless millions have been spent in creating it is presented with lavish press conferences and promotional campaigns. I honestly find this highly annoying and it shows where we are as a people in terms of our mental development.
I'm daring to change that culture and see if I can bring my country even one step closer to the 21st century. That's why I'm challenging myself to fix a problem that plagues everyone in my country, and i'm going to fix it with a budget of $20USD and I want to see how my countrymen react to it. It's going to be practical, free and simple to use. Let's see how it goes.
Thursday, August 23, 2012
jQuery QR Code Generator
It's called jQuery QR Code and it's written by Jerome Etienne. Take a look at his GitHub project and tell me what you think. This will definitely come in handy on my current project!
Saturday, March 03, 2012
Fixing Ubuntu Issues: No Wireless on Reboot
In recent times it has not been uncommon for Ubuntu to not be able to connect to my wireless network on boot up, so I did some digging and found out that the problem was that the Automatic DHCP IPv4 settings were to blame. My solution: use manual IPv4 configuration. Here's how.
My internet set up is as follows :- My modem is connected to my wireless router which propagates the signal that my PC's USB wireless adapter receives. There's plenty of networking going on there, (something I am not the best at) but I do know that finding out the IP addresses of my various pieces of network hardware will be the key.
So on my Windows machine i ran ipconfig and found out those addresses:
192.168.1.1 - My modem's address
192.168.2.1 - My wireless router's address (Default gateway)
192.168.2.5 - Address of PC
255.255.255.0 - Subnet mask
I took those settings over to Ubuntu, opened the network manager by clicking the Wireless icon in the top task bar, selecting Edit connections... > Wireless > FBI_VAN_467 (My SSID) > Edit... > IPv4 Settings and entering the information as follows:
I chose a random non-conflicting IP address for my Ubuntu PC's address, used my wireless router's IP address for my default gateway and set my DNS server address to my modem's address.
After that it worked like a charm. I hope this helps!
Thursday, March 01, 2012
New Search Engine - DuckDuckGo
Now, anybody who knows me knows that I'm a G-Man (Google Man) through and through, but honestly i've not been to happy about their recent skirmishes with the law when it comes to people's privacy and the extent to which they will go to get your personal information so that they can target ads to better suit you.
Truthfully I was never a fan of the idea that I was being herded and processed by a big company that was going to use my personal information, my likes, dislikes, hobbies - my personality - to make money, but I had to tolerate it because it was the companies behind some of the best internet services that I use were doing this.
Now there's a new duck in the search engine pond and this one is more morally secure and less thirsty for money and is doing... just fine! I'm talking of course, about DuckDuckGo.
![]() |
Google Search Results |
![]() |
Results from the Duck |
Friday, February 24, 2012
Validating Virtual Attributes in Rails 3.1
Class User attr_accessor :password validates :password, :presence => true, :on => create validates :password, :length => { :minimum => 6 :maximum => 8 }, :if => :password? . . . endWhen calling valid? on the User object I got a method undefined error for password?. I could't quite figure it out and I was wondering what I was doing wrong until eventually I tried appending the following to the bottom of the class definition:
. . . def password? self.password.present? end . . .An seemingly simple and obvious solution, I know, but this took me about an hour to figure out after Stack Overflow failed me for the first time.
I hope this helps save someone else the frustration I endured.
Thursday, February 23, 2012
Fixing Ubuntu Issues: Ugly Font Rendering in NetBeans
The first step is to uninstall Open JDK (if it is installed) and install Sun's JRE. Do that by selecting the following packages in the synaptic package manager:
- sun-java6-bin
- sun-java6-jdk
- sun-java6-jre
Mark all installed instances of Open JDk for uninstallation if you have to, then click Apply.
Confirm your Java version by going to the console and entering
java -versionYou should see
java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)
ttf-mscorefonts
![]() |
Before |
References:
http://ubuntuforums.org/showthread.php?t=1930034
http://www.howtogeek.com/howto/15495/add-microsoft-core-fonts-to-ubuntu/
Wednesday, February 22, 2012
Fixing Ubuntu Issues: Restart Wireless Without Reboot
sudo ifconfig eth1 down sudo ifconfig eth1 upWhere eth1 = your network interface. Could be wlan0 or something like that. I have not yet tried this out, but it's one of the more sane solutions i've come accross for this problem during my searches.
Fixing Ubuntu Issues: Flickering Pointer
Note: xorg.conf is depreciated in Ubuntu 11+
Type the following in a new console window:
cd /usr/share/X11/xorg.conf.d sudo touch 10-monitor.conf sudo gedit 10-monitor.conf
Paste the following into the file, changing variables where indicated by the comments
Section "Monitor" Identifier "Monitor0" EndSection Section "Device" Identifier "Device0" Driver "nvidia" #Choose the driver used for this monitor EndSection Section "Screen" Identifier "Screen0" #Collapse Monitor and Device section to Screen section Device "Device0" Monitor "Monitor0" DefaultDepth 24 #Choose the depth (16||24) SubSection "Display" Depth 24 Modes "1680x1050" #Choose the resolution EndSubSection EndSection
Save the file.
Press CTRL + ALT + FI to enter terminal mode and type the following:
sudo stop lightdm sudo start lightdm
Log in and notice that the cursor does not flicker any more. You may have to unplug your mouse and plug in back in to get the cursor to work. If you do not get back to the graphical mode after starting the display manager, press CTRL + ALT + F7
Reference: http://ubuntuforums.org/showthread.php?t=1730188
Friday, July 29, 2011
Venturing Into Vim
As an aspiring Ruby on Rails developer, I looked around to see what was the best code editor I can/should use for handling the development of a RoR web application. The vote went almost unanimously to Vim - a minimalist as (according to its veterans) extremely powerful code editor.
So this week I took a journey into Vim land to see what all the buzz was about and boy was it a rough one. Vim is not Notepad++, Komodo Edit or any other code editor that you've used before, and that's a key concept to remember when learning to use Vim, because operating as you did in your previous editors will send you into a mad swirling fit of rage and confusion.
Vim is it's own beast. The fact that you have to press a key before entering text and press another key when you've finished entering text should tell you a lot.
After a week of use, though, I must say that I chose wisely in the investment of my time and I would like to encourage my fellow coders to do the same. Get in the know with this great (yet sometimes frustrating) piece of software; it's powerful, simple and fast.
There isn't an opinion of Vim that wasn't stated by Jeffrey Way over at his blog, so I'll leave it up to you do some further reading.
Happy Vimming!
Monday, March 14, 2011
Regular Expressions
function echeck(str) { var at="@" var dot="." var lat=str.indexOf(at) var lstr=str.length var ldot=str.indexOf(dot) if (str.indexOf(at)==-1){ alert("Invalid E-mail ID") return false } if (str.indexOf(at)==-1 || str.indexOf(at)==0 || str.indexOf(at)==lstr){ alert("Invalid E-mail ID") return false } if (str.indexOf(dot)==-1 || str.indexOf(dot)==0 || str.indexOf(dot)==lstr){ alert("Invalid E-mail ID") return false } if (str.indexOf(at,(lat+1))!=-1){ alert("Invalid E-mail ID") return false } if (str.substring(lat-1,lat)==dot || str.substring(lat+1,lat+2)==dot){ alert("Invalid E-mail ID") return false } if (str.indexOf(dot,(lat+2))==-1){ alert("Invalid E-mail ID") return false } if (str.indexOf(" ")!=-1){ alert("Invalid E-mail ID") return false } return true } function ValidateForm(){ var emailID=document.frmSample.txtEmail if ((emailID.value==null)||(emailID.value=="")){ alert("Please Enter your Email ID") emailID.focus() return false } if (echeck(emailID.value)==false){ emailID.value="" emailID.focus() return false } return true }To this :
function validateEmail(str) { var RE_EMAIL = /^[a-z]+[\w-_]+@[a-z]+\.[^@]*\w\w$/ if(RE_EMAIL.test(str)) { return true; } else { return false; } }If you are like me and you never understood regular expressions, I would advise you give them a try. If you're a web developer, one of these days you are going to have to develop a form component that needs validation. Learning regular expressions is a definite time saver and I would suggest you invest the necessary time into learning them.
Saturday, February 26, 2011
Friday, February 25, 2011
Clients from Hell
Me: “Ok, we’ve pushed the site live.”
Client: “Why isn’t the site #1 on Google yet?”
Me: “We just pushed it live five minutes ago.”
Client: “Optimize the fireball.”
Me: “I’m sorry? Do you mean the firewall?”
Client: “I need more hits NOW, so I need you to optimize the fireball. I know what I’m talking about!”
Me: “We’ll get right on it.”
Tuesday, February 22, 2011
Productive Unproductivity
Unfortunately this confidence is the source of your frustrations as you will find that the deadline for that multi-faceted, highly featured business web application is closing in and you realize that you've spent an entire day trying to find out why the jQuery.post() function isn't receiving JSON information from your PHP script on the login page.
With just a few days left to finish this app, and a myriad of other documents, reports and meetings to tackle, this is going to be one interesting week.
Monday, February 21, 2011
Left FB For Good
The internet is really a lonely place when you're doing everything your friends aren't. In this case, i'm glad to be alone though - FB was a giant waste of time and a huge distraction from more important things.
Oh well, on to the next thing I suppose.
Tuesday, October 27, 2009
Lovely Titan Robot on Gitex Exhibition 2009 - Dubai
As a (soon to be certified) Computer/Software Engineer, it really would amaze me if I even glimpsed the components and programming that went into creating this machine.
As a primitive citizen, seeing a walking singing robot of this size is just plain scary!
Thursday, October 01, 2009
Spiderman, ALHC Showcase 2007
Who thought that the spider man theme song had so many woprds? Oh, and the dancing is pretty cool too :)
Tuesday, September 15, 2009
No School Today
A mix-up of some academic records has left me without a torture pit (school) to call my own for the next few days. What’s worse is the fact that ALL of my friends have found something to do in the mean time. The ones who weren’t victims of the mix-up have all gone back to school, or are setting foot on the bottom rung of ye old career ladder. The others who have stayed back to do over a subject or two to raise that pesky GPA are enjoying the sweet life, walking on that wonderful duplicitous edge of “I’m in school but not really”.
And that’s just my school mates; I have other friends whom I witness cresting the sweet, sandy dunes of campus life. There are the ones at UWI aka the fun-central of all Trinidadian academia and the intellectual mating ground for all post-pubescent young sluggers of all shapes and sizes. Yes I would love to go there, yes the thought of every fine, sexy kaiyo from here to Caracas all in one area is a formidable one, yes I know that guys who go there get luckier than a dollar bill at a strip club and yes, I know my girlfriend goes there (I try not to think about it, especially after previous point) stop! … I really forgot where I was going with this paragraph…
Look the point is, is that it’s usually an old friend of mine sweating his brains out through the ear at some academic institute who would ask me what I’m doing with my life these days. What am I to tell him, that I’m in academic purgatory? Or that old chestnut, “Residing in a temporary state of limbo”? I mean come on! It is in these times that I stand and babble for words because I feel like I’m wading in the shame surf because I chose to vacation on Incompetent Island. I want to be sweating my brains out through the ear; it’s how I feel most comfortable. WHERE IS MY PORTION OF SCHOLASTIC TORTURE???!!
The point is I’m bored as hell, and right now I feel like life is passing me by like a black cab in London. Sadly, I can do naught but wait, wait for my little “sichiation” to be resolved and for the schooling system to open its mouth up wide and swallow me with a gulped chaser of immense workload and unreasonable deadlines.
Hey coming to think of it, this is kind of like Burn Notice except that Michael Westen was accused of selling secrets to Bosnian intelligence agencies, and I’m being accused of… well, nothing; one of my grades was just misplaced. Oh, oh, I got a better one – Michael is trying to get back into the Central Intelligence agency and I’m trying to get back into… UTT… ok this is nothing like Burn Notice at all. Dammit!!
