News for hackers. Stuff that matters.

knightni

Re:4K is for programmers on Monday January 13, 2014 @06:06AM (#7049933)
I don't dispute that windows developers are in the majority - I dispute that other choices are as vanishingly rare as your initial comment suggested.

Anecdotally (I work at a large corp), slightly under half our devs use Linux. You only need to look at the array of software-for-programmers that's available under Linux to see that it's an extremely popular choice - the availability of programming software and libraries is generally better under Linux than it is under Windows.

While linux is certainly a bit more hassle to maintain than windows (I use a mac when given the choice, which i find gives me the best of both worlds), it's still a clearly superior environment for highly technical users. It's only recently with the introduction of Powershell that Windows has stopped being a substantial handicap for developers, imo.

Re:4K is for programmers on Friday January 10, 2014 @07:06AM (#7036226)
An extremely large number of programmers use Mac and Linux machines. Linux on the desktop is sustained to a substantial extent by a programmer audience - and you only have to look at the availability of software for it to see that it's popular among that group.

Personally, when I'm not using a unix-y environment, it's because I've been forced. Using windows as a programmer feels like having one of my hands chopped off.

I think there's two really great things about retina screens on desktops/laptops:

- Firstly, I definitely notice the difference. The higher res screen is noticeably nicer to read. Sure, you don't need to go to the crazy extremes of some newer high res phones, but standard desktop monitors are noticeably ugly by comparison.

- Secondly, the res is high enough that you can finally change (apparent) resolution. My parents are in their late 60s and have bad-ish eyesight, so they lower the resolution on their screen. The result is incredibly ugly. Unfortunately resolution independent display seems to be a forgotten goal in modern OSes, so having screens that can change res is definitely worthwhile.

Re:PostgreSQL Exercises on Thursday December 12, 2013 @10:41AM (#6894986)
You're running into the fact that Postgres doesn't automatically cast ints to floats - so 1/50 = 0. Try using 1.0/50.0 instead.
Hereditary, but not in a strong sense - to quote the american diabetes association:

> In general, if you are a man with type 1 diabetes, the odds of your child getting diabetes are 1 in 17. If you are a woman with type 1 diabetes and your child was born before you were 25, your child's risk is 1 in 25; if your child was born after you turned 25, your child's risk is 1 in 100.

Even if both partners are diabetic, the risk is only 1 in 10 to 1 in 4. This strongly implies that what is heritable is the vulnerability to getting diabetes, rather than getting diabetes itself. There is, presumably, some trigger that also needs to occur.

Re:I'm a loser and I want to change that - now on Monday March 18, 2013 @06:29AM (#5393369)
That's kind of you to say! I think, honestly, that it's great to work with/for anyone who takes joy in what they do.
Re:I'm a loser and I want to change that - now on Sunday March 17, 2013 @06:26PM (#5391351)
> Being a programmer is fucking boring ... They want you to spend your time ... optimizing their databases

Honestly, I really fucking love optimising databases. I can't believe my luck that people want to pay me to do that sort of work for 8 hours a day.

To me, hell is having to define and defend my own problem. I would loathe running a startup - I love the feeling, instead, of having people come to me to solve their problems. Fortunately, I've managed to arrange a situation where enough of those problems are reasonably interesting to my apparently unusual tastes :-).

This is not meant as a dig against those who run startups, just a note from someone with a very different perspective.

Re:Postgres: The Bits You Haven't Found on Sunday March 03, 2013 @04:15AM (#5313084)
WITH and window functions are portable (and both awesome - they will change the way you write your SQL for the better). I'm not sure if WITH RECURSIVE is portable - my recollection is that oracle and db2 at least don't need/use the RECURSIVE qualifier for recursive ctes: they just work it out for you.

Time intervals are also in the SQL standard as I recall (although not in the format listed here - postgres supports standard syntax too though). Not sure how fully supported it is cross-database, though.

Re:Announcing MoSQL on Tuesday February 05, 2013 @03:42PM (#5173098)
...data warehouses in general mostly use SQL, and lots of businesses use data warehouses successfully. Teradata, Netezza, Oracle, DB2, etc. I'm not sure why his statement was controversial - SQL's a great language for reporting and analytics.
Re:Announcing MoSQL on Tuesday February 05, 2013 @03:20PM (#5172984)
I would imagine that for your average startup, using solutions that don't even support transactionality will cause greater complexity issues. Especially given the enormous window before db scale out/up becomes an issue on well-designed applications.
Re:MySQL - Do Not Pass This Way Again on Sunday January 27, 2013 @04:07AM (#5123717)
> LIMIT OFFSET queries are always going to be hard because you have to generate lots of rows only to throw them away

In fairness, that often depends upon the intelligence of the planner. A lot of sort-limit-offset queries can be reasonably easy and not generate too many rows if the planner works correctly and you have the right indexes.

edit: Assuming you're mostly picking up early pages as opposed to getting late ones, anyway - which is usually the case for, say, a comment system.

Re:MySQL - Do Not Pass This Way Again on Sunday January 27, 2013 @03:55AM (#5123698)
...or he could use a dbms that works properly and save himself the hassle.
This is awesome, thanks :-)
The problem is that by punishing companies and rewarding individuals, you tend to create an incentive for individuals to break the law (the risk/reward, on a personal level, gets skewed). In cases like this it's arguable that the individuals involved should be prosecuted.
Re:More on Postgres Performance on Friday January 11, 2013 @07:51AM (#5042427)
Oracle and DB2 both offer ways to provide hints to the database about how you want the query processed, and the ability to store those hints independently of the query - Stored Outlines and Plan Stability being the features in question. This is particularly useful when you can't risk the plan changing in production and screwing you over - in that situation it's preferable to experience a gradual degradation->optimisation cycle personally.

It's one thing that I find it frustrating that Postgres (which I otherwise love) doesn't offer - I understand that they don't like optimiser hints, but at least the ability to say 'keep using the current plan until I give you permission to do otherwise' would be invaluable.

Re:The Unreasonable Effectiveness of C on Thursday January 10, 2013 @11:42AM (#5037934)
C# is an improvement in this regard - it at least gives you structs for when you need to store related data together without any greater overhead than you'd have in C.

Unfortunately unless you're on windows it's not that fast compared to Java.

Re:Save your eyes, start using f.lux on Thursday January 10, 2013 @09:10AM (#5036894)
Why not mess with colour? I have no need to see the 'correct' colour, if it's less comfortable to me.

I actually leave my LCDs at a redder tint most of the time now, as I find it more comfortable. This is particularly useful as most desktop LCDs won't adjust their brightness down far enough for me. Laptops are better, since they actually bother to adjust the power of their backlight.

Re:UK still has 13,000 black-and-white TVs on Thursday January 10, 2013 @06:24AM (#5036429)
Blind people who still like to listen to television may be a significant cause of this. They receive a 50% discount on both colour and b&w licenses, so from their point of view there's probably little reason to upgrade from a black and white television.
Re:An iPhone lover’s confession: I switched to the Nexus 4 on Friday January 04, 2013 @11:08AM (#5008203)
That's absolutely fair enough - I love that there's a variety of options out there for everyone, and I'm never going to criticise someone for finding what works for them.

I guess my point was more about the statement that there's no need for customization if the OS is well-designed - to my mind, there may be no need for customization for many (or perhaps even a majority) of users, but there is for some. An OS that tried to serve all niche needs without allowing customization would likely be a confused mess - and yet, for those users, having their niche need served can be extremely important.

Re:An iPhone lover’s confession: I switched to the Nexus 4 on Friday January 04, 2013 @07:11AM (#5007282)
My understanding was that at least on the lock screen there was no easy way to distinguish between different calendars - I want birthday reminders to show up persistently for at least a week before the event, which is obviously undesirable for most other events.

If the lock screen gets/has that functionality, I'm not sure what the real difference between that and a widget is - except that mine displays on the home screen while yours displays on the lock screen.

Re:An iPhone lover’s confession: I switched to the Nexus 4 on Friday January 04, 2013 @06:08AM (#5007122)
I disagree - widgets are enormously important to me, and were the deciding factor in my choosing an android phone. I'm quite forgetful, and I have a tendency to focus on one thing to the exclusion of others. Widgets allow me to display important information on my home screen that will be shown to me every time I look at the phone.

This means that I can have a list of (for example) upcoming birthdays on my phone that I see over and over again, enough that I will eventually see the reminder at a point when I am in a position to do something about it. Alarms are useless by comparison, because I will inevitably be busy with something else when they go off. Calendars/todo apps are equally useless to me, because they require me to remember to open up an app all the time.

I realise my use case is relatively niche, but I imagine there's a lot of different niche users out there that benefit from customisability.

Re:Ask HN: Best books you read in 2012 on Tuesday December 25, 2012 @03:48PM (#4967074)
I read Thinking, Fast and Slow this year too, and it is definitely up there on my best books of all time list.

I also read Black Like Me, which seems to be required reading in the US, but I only recently became aware of it. Definitely worth a look.

Re:C Books and C++ Books You Don't Want on Tuesday December 25, 2012 @10:42AM (#4966207)
I definitely found this an excellent read as well.
Re:First Sale Under Siege: If You Bought It, You Should Own It on Sunday December 23, 2012 @05:09PM (#4960862)
Region locks are desired by copyright holders too, as it makes it easier to maximise incomes per region based on their ability to pay.
Re:What Compsci textbooks don't tell you: Real world code sucks on Saturday December 22, 2012 @07:42AM (#4956460)
Don't get me wrong, I don't strive for 'perfection'. I passed through the architecture astronaut phase quite some time ago now :-).

Equally, I don't think that the opposite end of 'hacked together' is some kind of AbstractAbstractFactoryFactory extravaganza - that's just a different kind of bad code. To me, good code is code that is simple for other people to understand, and takes basic precautions with respect to being not-too-brittle to change. Every so often, I find that once the code has received enough alterations, it needs a bit of TLC.

Re:What Compsci textbooks don't tell you: Real world code sucks on Saturday December 22, 2012 @05:17AM (#4956288)
Most of the time, when stuff I write ends up as 'bad code', it started out as good code, and then got mangled over time due to a series of requirements changes (not necessarily due to bad processes - you often just understand your requirements better as you go along).

This is a fairly natural series of events that can be helped by periodic refactoring. Unfortunately, because each change is small, none of them on their own justify the time required for the refactor. That's when you've got to hope you've got a management team that trusts your judgement, and is willing to carve out the time necessary for this stuff. Most people, alas, don't have that.

Re:SQL Indexing and Tuning e-Book on Sunday December 16, 2012 @03:48PM (#4929462)
Fantastic stuff - this is definitely worth a look.
Re:IRecognition: I am no longer Apple's Target Market on Thursday December 06, 2012 @10:20AM (#4882042)
I haven't, actually - thanks, I'll take a look.

I'm very attached to really good, big touchpads though - losing gesture support is hard!

Re:IRecognition: I am no longer Apple's Target Market on Thursday December 06, 2012 @06:03AM (#4881294)
I really love my work thinkpad, except I'm not a big fan of trackpoints, and the touchpad is truly hateful. For work that's fine because I'm always docked, but I probably wouldn't consider them for personal use for that reason alone.
Re:Dell releases powerful, well-supported Linux Ultrabook on Thursday November 29, 2012 @03:48PM (#4850179)
This just isn't true.

A couple of years ago an issue with the USB3 driver broke suspend on laptops with USB3 for quite some time, requiring workarounds. Multi-touch trackpads took some time to get full gesture support. Auto-switch between paired graphics cards still doesn't work.

That's not to say things aren't pretty good now - but to imply that linux doesn't require some fiddling about under the hood hardware-wise is stretching a lot.

Older »