HNHacker News
TopNewBestAskShowJobs

naiquevin

222 karma · joined September 12, 2011

https://www.naiquev.in/
submissionscomments
naiquevin··on Django 1.5 released
It's great to see the Django tutorial extended to cover testing[1] and writing reusable apps[2]. These days there are quite a few Django tutorials out there covering best practices etc. (which are very good) but I would still recommend the official Poll app tutorial to any beginner because of it's simplicity.

[1]: https://docs.djangoproject.com/en/1.5/intro/tutorial05/

[2]: https://docs.djangoproject.com/en/1.5/intro/reusable-apps/

naiquevin··on Security releases issued
I too upgraded and everything went smooth except got a "Bad magic number" error[1] while running south migrations. The fix is to delete all .pyc files (even those inside the virtualenv)

[1]: http://stackoverflow.com/questions/514371/whats-the-bad-magi...

naiquevin··on Hello. I'm a compiler
Yes, it's websockets. You can check it in Chrome by keeping the console open and refreshing the page. Would be interesting to test in IE.

BTW, as much as I am amazed to see websockets in action, the real time updating of vote count feels creepy and distracting at the same time :-)

naiquevin··on Vivid Schemer: An Interactive Version of the Little Schemer
As a fan of both Little Schemer and The Hitchhicker's guide to the galaxy, I find this awesome. One suggestion, it be great to have parens matching in the editor/textarea
naiquevin··on If I get hit by a truck...
Exactly what I thought when I saw the year in the URL. This is just incredible. There isn't a slightest hint of being written by a 16 year old. What a huge loss
naiquevin··on Python alternatives for PHP functions
This works fine too,

   dict((k, []) for k in keys)
Although I later realized what I really needed was defaultdict[1]

   d = defaultdict(list)
[1]: http://docs.python.org/2/library/collections.html#collection...
naiquevin··on Python alternatives for PHP functions
> Rather than handing out ready-made functions to make Python behave like PHP, this site actually teaches you how to write Python like a real Pythonista.

Not in my opinion. Here is my personal experience of using this site when I was just starting with Python. I had landed up there looking for a function similar to PHP's `array_fill_keys`. And it showed me `dict.fromkeys(keys, value)`[1] without a slightest of warning that unexpected things will happen if its passed a mutable data structure such as an empty list as the value.

So IMO, for people coming from PHP background writing some of their first Python code, it can be helpful at times but not an alternative to learning Python from a book or some serious online resource. Moreover, the site itself says that it won't teach you either PHP or Python.[2]

[1]: http://www.php2python.com/wiki/function.array-fill-keys/ [2]: http://www.php2python.com/about/

naiquevin··on Dbv.php: Database version control
>> It would be nice if people actually used tools like this rather than tried to bang their own together with mysql_query.

Totally agree with this.

After getting super impressed by Django's South migrations[1] app, I wrote a minimal migrations tool[2] for PHP-MySQL projects without checking if solutions already existed :-). Used it in two projects and it made life a lot easier for me and the team.

This looks much better though. Will definitely give it a try for my next PHP project.

[1] http://south.aeracode.org/

[2] https://github.com/naiquevin/phpDbMigrations

naiquevin··on 3 Things Self-Taught Developers Missed
A better title would have been '3 things self-taught developers should know/read'. Everything that the article mentions as 'missed' is fixable. As a self taught programmer, I admit that at various points in my programming career I was unfamiliar or didn't have a deep understanding of at least one these things. But I could fix it (and still trying to fix BTW) by reading up and taking open online courses. So as long as there is willingness to learn, no one has missed anything. OTOH, I feel that if there is anything I have missed because of not studying computer science in school, it's participating in things like Gsoc and internship opportunities while I was studying.
naiquevin··on Sticky Headers with Pure JavaScript and CSS
The readme refers to the administration panel of a magento instance and not the magento website. May be I should remove the link to the website to avoid any confusion. Any way, will try to set up github project page this weekend.
naiquevin··on Sticky Headers with Pure JavaScript and CSS
I like your style of using 'jeeves' as the namespace for useful helper functions :-) BTW, I have been recently working on a sticky buttons plugin myself https://github.com/naiquevin/jquery-sticky-buttons Uses jquery, no hosted example, not quite well documented and I have no idea if it works on iOS but I am planning to fix the last these points soon (except jquery)
naiquevin··on Show HN: Use landing pages to test your product
Somewhat off topic but out of curiosity, for what genuine technical reasons would one show "There is a queue" message on the signup page? One would be very large no. of signups immediately following the launch. Anything else?

I don't subscribe to the idea of landing pages for non existent products but I feel that if lot of new products start showing such a message when there aren't many technical reasons to do so, no one is going to believe about the queue thing anyway. OTOH, people might start using it as a filter instead!

naiquevin··on MongoHQ launches new tools for monitoring and managing databases
Thankyou for asking this question. It cleared a lot of things for me too :-)
naiquevin··on Want to learn Django? Start here.
+1 for the django.me tip. I can see myself using it all the time from now on :-) Out of curiosity, how and where did you find out about it? http://django.me redirects to the main page of django docs and google search didn't give any useful info.
naiquevin··on Do JS styleguides reflect how popular open source code is indented?
> I.e. I suspect that those using 4 or tabs also use long lines.

Not really, I think length of indentation affects the length of the line only if there is a lot of nesting. For HTML I use 2 spaces as I know there is going to be a lot of nesting, whereas in JS, not so much, so 4 spaces works perfectly for me. Also, in JS, chained function calls be aligned on multiple lines which makes it more readable as well.

naiquevin··on Rahul Tyagi: Jericho Emails
and "Mail me" is a link to gmail.com!
← PreviousPage 3 of 3