GCI 2012 and Sahana Software Foundation
This is a post about my experience working with the Sahana Software Foundation, a nonprofit organisation that develops software like Eden, Vesuvius and Agasti to help organisations like the UN in disaster management efforts. (I was selected as one of the Grand Prize Winners for GCI 2012 from SSF. :D) The Experience Before working with Sahana, I’d never really used Web2py, only Flask...
I haven’t posted here in a while, so here’s a status update: I’m alive. :) 11th grade doesn’t really leave you with much time for anything. So… anyway, no excuses :) I had my second term exams - and I screwed up pretty bad. Shubham and I came 2nd at the TCS IT WIZ national finals held in Chennai. Prempal and Arnav from Delhi won (on the tie breaker!) —...
TCS IT Wiz is coming up (the Kolkata edition’s on the 9th) and that means a lot of research work, especially from Wikipedia. So, I wrote up a quick tool to export Wikipedia pages as PDFs. First, install Python 2.7 from here and download the following script: Then, install PIP by downloading and running https://raw.github.com/pypa/pip/master/contrib/get-pip.py and execute the following...
You're an Idiot If You Use PHP.
Mohammed: i like coding in PHP :D
me: Then you're an idiot. I'll tolerate anything but two languages: PHP and BASIC.
BASIC goes for me too
me: PHP is brain-damagingly bad.
Mohammed: but it is used so widely.......
me: That doesn't automatically make it good.
Mohammed: but PHP must hv[sic] something which made it the most widely used server side language. I know that Python is a powerful language but you can't just say that PHP is bad
me: I can and I am. Here's why it's that popular: because you can just drop HTML into PHP source code and you can just drop PHP code into a directory and it "just works." That makes it easy for newbies. Doesn't mean that it's the safest or the best thing to do. In fact putting source code into a web facing directory is an absolute no-no. The standard library in PHP has no namespaces and is a big messy ball of functions. There's no consistency when it comes to naming: there's functions like strlen and also functions like str_foo. The parameters of these functions, even when they are exactly the same, don't follow the same order. The typecasting system is laughably bad. For example, in PHP:
"3 hundred spartans" == 3
would evaluate to true. The syntax for many common language features like variables and hashes is poorly thought out and clunky. $and_all_variables_look_like_this and hashes (dicts in Python) use => as a separator. Need more evidence? Newbies using PHP is bad as it is.
Mohammed: nah :-|
me: But knowing all this and still using PHP is nothing but stupidity.
Mohammed: i got my answer (an intelligent answer)
i saw the 'real' face of PHP
as always......u tell me things which prove to be very awesome
me: lol. Anyway here's more:
Mohammed: thanks :D
me: The biggest problem with PHP
is Rasmus Lerdorf (the guy who created it)
According to him, "PHP is a language for non-programmers"
Mohammed: that's right
me: and "PHP is not engineered ... it was just hacked together" (rough quote)
Check it up.
When I write something, I want it to be fast, readable and bug free.
PHP doesn't let me do that (easily.) In fact a lot of PHP itself is very buggy. For example, I remember a case where a standard library function was supposed to return false, but was returning a "falsy" (anything that resolves to false, in this case 0) value and someone reported that it was causing some of his apps to break, but the issue was closed without a fix. Things like that.
Is it possible to develop good software in PHP? Yes. But it's extremely difficult. Your programming language should make it as easy as possible for you to develop stuff.
(there are a lot more things that are broken in PHP, but I don't know enough of it to tell you about all of them, and frankly speaking, I don't want to know more than I already do; it's bad enough as it is.)
I recently managed to grab Limbo (and a few other excellent videogames) as a part of the 5th Humble Indie Bundle. I’d seen Limbo long before HIB5, but back then it’d only been released on XBLA, which is why I was overjoyed to see it on HIB5 (which usually means Linux compatibility.) Unfortunately it appears that the Linux version is a simple WINE wrapper over the Windows version....
Learning #1: Flask
This is a new series of posts wherein I’ll post about something at the start of a month, learn about it and experiment with it through the month. At the end of the month, I’ll make a post about all my experiments and learnings. To kick things off, this month, I’ll be doing: Flask, the Python microframework. Why Flask? I’ve been using Django for Python web...
Is Academic Performance Related to Age?
(This data was gathered from my school’s examination results.) Apparently not. It looks like academic performance has no correlation with age. However there’s a noticeable dip in the graph towards the “19+” end, which might be caused by these students failing and repeating the class (hence the age difference.) (The dataset consisted of 230 tenth-graders.)
How I Got My School's ICSE Exam Results.
First, have a look at ICSE Results (Loyola) and Prizewinners/Toppers (ICSE). It was as simple as this (farily hackish) Python script (which uses the awesome requests and BeautifulSoup libraries): Edit/Note: If you’re planning to use this for your own school, you should probably note that it doesn’t take subjects other than the ones taught at Loyola into account, so results...
An Easy Problem?
Quick, without much thought, how would you extract the sign of a 32-bit integer? The question isn’t difficult but is interesting as it gives you an insight into a person’s though process. Most low-level C hackers who don’t know better (like yours truly from about three or four years ago.) will start rambling about sign bits and two’s complement and whatnot. Funny, right? ...
The long run is a misleading guide to current affairs. In the long run we are...– (I found this particularly interesting, especially in context — it was posted by a commenter on a HN thread about Groupon and what its fate might have been had it been bought by Google.)
Spamusement! (link) →
In the words of the creator, “Poorly-drawn cartoons inspired by actual spam subject lines!” Quite amusing.
I feel terrible saying this, but online advertising is dead. It never was “alive” anyway — and the reason is simple: if I needed to do something, I wouldn’t be online (definitely not on Facebook). If I needed to buy something online, I’d already be on Flipkart (or Amazon for those of you who aren’t familiar with the Indian ecommerce giant.) If I needed your service...
I stand by the window of an old train, Screeching along through torrents of rain. By meadows of joy and forests of dark sorrow. Through unknown towns, unknown villages and the countryside. Truly, here I am alone — but an observer Of a fleeting moment of time. Like a prisoner, who before the gallows, Looks through the bars of his prison — And finds beauty in the smallest things, And...
Just my type. (Dan Eden) →
It’s like a sampling palette for fonts. Very cool.
The Value of Software
I recently showed one of my collaborators on Quizzardous! the private alpha version that I came up with after around a month. I expected him to shower praises upon it, and call it the best thing since the Internet. After all, I was doing revolutionary work, no? The conversation was actually like: Me: Here, it’s awesome, isn’t it? Him: Er, yes, this, and that and that… ...
Successful people literally believe that through sheer force of personality or...
Shut up! Announcing your plans makes you less... →
Absolutely correct and sound advice. I’m experiencing this first-hand with Quizzardous!* - in hindsight, perhaps it would have been a better idea to just work on it, minus all the hype. Announcing a project early has its pros and cons - but mainly more of the latter. Pros: Announcing a project or telling friends about an idea might significantly change the idea itself. This is good....
Why the EU Cookie law is wrong.
hunterdolan: The Background The European Union has recently adopted a law that would require every website owner to ask a user for permission before the website can put cookies on the computer. This is greatly opposed by developers everywhere. And it’s just wrong. Read More
I’m Reversal and I find this Russian.
I'm Feeling Ducky!
I just changed my default search engine to DuckDuckGo, and I must say, it’s really amazing. The stylish, but minimalist homepage looks like Google, minus the additional clutter. Searches are completely anonymous and pool in results from a variety of sources, ranging from Amazon to Wikipedia. Ads are unobstrusive and can even be completely disabled if you want. The best feature, though, is...
Evolution of a Web Developer From PHP Newbie To... →
(See link above) This almost completely describes my history in web development, apart from the fact that unlike the author, I quickly realised that I was happier with Postgres (and other traditional relational databases) after a run-in with Google’s AppEngine Datastore (a non-relational database like MongoDB.) Also, I couldn’t tolerate PHP long enough to even try out CakePHP and other...
PHP: a fractal of bad design →
A brilliant blog post, which goes to great lengths to describe everything that is screwed up with PHP. I’m glad I switched to Python early on.
HOWTO: Get started with Amazon EC2... (1/2)
TLDR: I just got myself an Amazon EC2 micro instance (which, by the way, is free for an entire year) and set up gunicorn and nginx on it. This is the first blog post, which documents the EC2 part of the process. I’m assuming you’ve already created an Amazon Web Services account. There’s nothing much in it, just the regular email confirmation, followed by a phone number...
Instagram: Instagram + Facebook →
… and it had just been released on Android. :( must all good things end this way? instagram: When Mike and I started Instagram nearly two years ago, we set out to change and improve the way the world communicates and shares. We’ve had an amazing time watching Instagram grow into a vibrant community of people from all around the globe. Today, we couldn’t be happier to announce...
Bash-style 'clear' in Python
Safe Shepherd: Startup chaos, and Crashing our way... →
safeshepherd: I’ve been asked to write this blog post by many, many friends over the past few months; here it is. Everything changed when Dave McClure checked-in on Foursquare three blocks from our apartment… My co-founder Geoff and I began our start-up adventure with nothing more than blind ambition, a…
Between “a painful, slow and horrible death” and “studying...
It’s official. The board exams are overhyped. Not even the Chemistry paper was as difficult as I’d imagined. (over the course of several terrifying nightmares and overnighters) Just checks for basic competence in all subjects. And yet, people manage to fail it. Hats off!
You might have noticed, I’ve moved the blog again, and this time to Tumblr. Looks better, though.