HNHacker News
TopNewBestAskShowJobs

gardarh

236 karma · joined May 14, 2010

submissionscomments
gardarh··on A new Gmail inbox
Looking at my girlfriend's gmail Inbox makes my eyes bleed, it's a mishmash of seemingly irrelevant email, lots of promos or facebook notifications more than half of which is unread. I sometimes find it hard to control myself not to "clean it up". This seems like a perfect addition for her... as for me, I've already setup my filters and am already happy with gmail as is; I don't think this will interfere with that. Seems like a feature designed for the 99% of people who don't frequent HN.
gardarh··on The overlooked issue of Windows 8
My understanding is that this does not kill the app, merely removes it from the list.
gardarh··on BeagleBone Black: A 1-GHz computer for $45
Also there is a nice Ubuntu port available. It feels rather stable and more familiar than Angstrom, I recommend it. Of course you'll lose Cloud9 from the box.
gardarh··on BeagleBone Black: A 1-GHz computer for $45
It means you can get started right away. If you want to be more serious, sure, write stuff in C or whatever, it works fine, after all this is just a Linux machine (with a simple webserver running cloud9 on port 3000). Or just ssh into the bone and edit your .js files in vim (it probably makes you feel a little bit more hardcore but yeah, it's still js).

No need for the negativity, can't blame those guys for wanting to get a larger userbase by making things easy. In the end the larger volume/bigger community is beneficial to everyone.

gardarh··on Sleep: Everything You Need to Know
From what I understand being drunk when going to sleep relaxes the muscles around your throat increasing your chance of apnea. The relaxed muscles around the throat means that the airway closes yielding a similar effect to choking (which is essentially what apnea is). The end result is that you choke periodically throughout the night meaning that the quality of your sleep is much inferior to what it could be; this is probably a large contributing factor to hangovers.

Edit: My source is a knowledgeable person on the subject, feel free to contradict or doubt the truthfulness of the answer - makes sense to me at least.

gardarh··on The Star Wars Route: Do a traceroute to 216.81.59.173
touché :)
gardarh··on The Star Wars Route: Do a traceroute to 216.81.59.173
Yes, this is a perfectly good class C network wasted. What a shame.
gardarh··on Tinke: Heart rate, blood oxygen level and more at your fingertip
You should be very cautious with this kind of self diagnostics.

- What if you get a negative result (i.e. you're ok)? Are you just gonna live happily ever after, ignoring any symptoms of sleep deprivation since you have already ruled out apnea?

- What if you get a positive result? You'll still have to go through the same kind of studies again, no doctor would give you much credit for your home study.

So, if you suspect you have sleep apnea you should go talk to your doctor. Your notes on sleep apnea are good though... it's a serious and a very commonly undiagnosed/untreated condition... even thought the cure is in most cases relatively noninvasive and cheap(CPAP). People above average weight should be particularly alert to typical symptoms (sleepyness, lack of energy).

gardarh··on Requests, Python HTTP for Humans, reached v1.0
I was dead wrong on what the issue was, but the actual explanation does actually hint that that doing error-prone calculation (such as deserialization) to magically calculate a property is not a good idea. I haven't seen the .json property used before but that only shows that I haven't looked into that many frameworks.

I'm not sure why java uses .length for arrays and .size() for collections ... but could it be that it was for similar reasons?

gardarh··on Requests, Python HTTP for Humans, reached v1.0
I just started using requests and one of the first questions I asked myself was "Hey, why isnt't this a function rather than a property?" . I'm not that seasoned python developer but it feels wrong to me that you have to perform work in order to calculate a property, making it a function feels more explicit about that "there is work being done here".

Requests is great by the way, had already written some code to abstract away the urllib/urllib2 mess but this module is so much more complete (of course) and cleaner.

gardarh··on Einstein's list of conditions for staying together with his wife
Perhaps a majority of people posting on HN are Serbs but only a small proportion of them declare their nationality.
gardarh··on Windows 8 — Disappointing Usability for Both Novice and Power Users
I actually love that feature, allows me to find contacts and lesser used apps very quickly.

Btw.: On phones that have hardware buttons (but no dedicated search button, like the European version of SGS2) you can open search by long pressing the menu button on the home screen.

gardarh··on The most dangerous code in the world
To demonstrate my point, try writing the following into C.java:

public class C { public int foo() { return 1; int b = 1 + 2; } }

Then compile it (javac C.java). You will get the following:

C.java:4: unreachable statement int b = 1 + 2; ^ C.java:5: missing return statement } ^ 2 errors

Therefore this code is not compileable, thus telling us that the initial code blob could never have run in the first place.

I'm not sure why the decompiler returns non-compiling java code, I just know it does.

gardarh··on The most dangerous code in the world
Just run the dex2jar tool on any android .apk and view the results in jd-gui. I've looked at a few apk's and weirdness like the one noted above is quite common. The code is being reverse engineered from a .smali file and the reverse engineering process appears imperfect. Of course any const names would be stripped away from the decompiled code leaving hardcoded integers (such as the 0 in paramArrayOfX509Certificate[0].checkValidity() ).

I'm not saying that the conclusion of the article is wrong, I'm merely trying to explain why the code blob above looks so weird.

gardarh··on The most dangerous code in the world
It looks a lot like the output from an Android decompilation tool... which tends to return some weird stuff. That code segment would never compile (code immediately below a return/break/continue/etc. statement causes a compilation error).
gardarh··on Show HN: Steerway - Share Tips and Libraries for Android Development
This is a great idea. I'm an Android developer and every now and then I think "I must be doing this wrong somehow". A list like that helps building a mental database of best practices, good job!
gardarh··on Do you really want to be making this much money when you're 50?
It's posts like these that get me as a programmer worried. Arrogance tends to lead to bad things and the world can change at a pace greater than one can imagine (a good way for me to understand how swiftly things change is to ask myself: Could I have foreseen x years ago what I am be doing today? for me, using the relatively low value of x=5 the answer is a definitive no. And I think that's a good thing).

Be humble if people are willing to pay you more money than others for what you do - it might change incredibly fast. The more generic assumption of the post is that people are willing to pay good money for skills that are relatively rare... well, make sure to keep your skill set up to date.

gardarh··on New Apple maps app under fire from users
This is off topic, but I have a SGS2 and was getting pretty tired of how the UI looked half-ICS and half-old after an ICS upgrade from Samsung (btw. OTA upgrade didn't work for me so I needed to resort to Samsung's Kies software which is amongst the worst software I have used and even with that I had troubles upgrading).

So I installed cyanogenmod 9.1 and I fell in love with my phone again. It's not perfect though but I don't think I'll ever want to buy a non-stock Android phone again...

So being a rather passionate Android guy I do recognize that there are very annoying problems with some Android devices. And installing cyanogenmod is way above the skill level of the average phone user (even though it's rather easy).

Sometimes I wonder if iPhone people experience the same kind of disappointments ... and when they do it makes me feel a little warm inside. I know it's not nice but I guess we all need to justify our own purchasing decisions to ourselves every now and then :)

gardarh··on IPhone 5: Apple’s 16:9 compromise
I don't agree with you on that point. Android layouts are designed from the beginning to handle different screen sizes and proportions, pretty much like html. One of the iPhone's strong point has always been that you can design "pixel perfect" apps, so that your design is exactly what users see (as a contrast in Android you have to define "points of stretching" for your screens).

The point here is that you have to create a new layout for the iPhone 5 (if you don't want your app letterboxed) and this adds an extra layer of complexity to the development. Seeing that there are also rumors about a different form factor iPad you would then have to maintain 6 different layouts (standard/retina/16:9 for iPhone, standard/retina/new layout iPad). Well or 12 if you have specific landscape layouts.

Designing UI on Android apps can be a pain since you don't have the "pixel perfect" paradigm, which is a common criticism on Android from iPhone developers, but if you manage to get them right you can get away with a single xml layout (of course, you can able to make things more complicated).

It seems to me that Apple are getting themselves in a bit of a mess with this. The tradeoffs with the "pixel perfect" method haven't really materialized until now.

Maybe I'm just being over pessimistic with this and it will be a non-issue, I really can't tell at this point, but I see this as the greatest issue with the iPhone 5 (which in turn is probably the reason they didn't increase the screen size earlier).

gardarh··on Apple rejects Drones+ thrice. App maker looks to Android
Seems to me that notifications were essential to the functionality of this app, you can't get that with a web app.

Of course the "web app is sufficient" point is irrelevant though, it's fundamentally weird that someone is making arbitrary decisions on which apps are allowed and which ones are not.

gardarh··on What It's Like To Be A Startup CEO - The Backstory
Just one minor thing... someone has to be with the kid every hour of every day. Don't know if you've been there but laying all that responsibility on your partner is, well, let's just hope the partner of the 5-minutes-a-day dad has patiente.
gardarh··on Android 4.1 Jelly Bean is now available
I sincerely agree. However 5 years is a long time, perhaps 3 is more appropriate. Keep in mind that the first iPhone was introduced 5 and a half years ago.
gardarh··on Android 4.1 Jelly Bean is now available
They are, with the Android Support Library: http://developer.android.com/tools/extras/support-library.ht...

It provides support for features from Android 3.0 (namely fragments) for all versions down to 1.6. IMO it's essential for Android development.

gardarh··on Three things you should never put in your database
Article says that logging to a non-production db "isn't a HORRIBLE idea" indicating that it isn't really a good idea. I used to work with a system where we routinely made complex queries against the log database. Parsing the log line before inserting to the db, putting relevant values into indexed columns seemed to me like a pretty good idea and provided us with a really easy-to-use and a rather fast diagnostics tool that no one had to learn how to use.

EDIT: Of course you have to make sure you don't do any writes that block the main operation, e.g. by using message queues.

gardarh··on Django is now (officially) on GitHub
The big benefit about DSCM is by definitions that they are in fact very portable so I don't think this is an issue. I can't really see how github could ever lock in their customers, if their product becomes inferior to others the switch will always be very painless.
gardarh··on Your Phone Loses Value Pretty Fast (Unless It's an iPhone)
Look at the "Crackberry Index" chart. Does anyone else get the feeling they have too few datapoints to reach any meaningful conclusion?
gardarh··on Dianne Hackborn responds again about android graphics
Funny, what I read was: "This is how Android graphics work, criticize it or praise it, but don't go off explaining it in your own words using wrong facts or incorrect assumptions and telling people you are an expert on the subject"
gardarh··on Googler: "we pushed a bad version of our iOS app for Gmail"
I actually think they could do a much better job with the gmail app on Android...
gardarh··on After the iPhone 4S, Android just feels wrong
I have to disagree with you - I got my SGS2 this spring (live in Europe) and it feels quite right to me. Browsing, for one, is really smooth. I thing Samsung did a good job with their Android customizations (well, they copied a lot of features from iPhone).

However the iPhone UI is much more polished. That can hardly be debated, feels to me like the Android dev team "just made it work" and didn't have too much time to worry about polish.

I really hope ICS fixes that.

gardarh··on Android 4.0 SDK Now Available
Check out the sequoyah eclipse plug-in. Makes it much easier to manage/debug ndk code from within eclipse.
← PreviousPage 2 of 3Next →