News for hackers. Stuff that matters.
Re:PHP Addiction by cletus on Friday June 29, 2012 @01:58PM (#4178029)
Is it my imagination or is Marco the king of writing blog posts that are quick reactions to whatever is trending on HN?

The message you should get from this post is that familiarity with one's tools easily trumps any aesthetic flaws (consistency in parameter ordering, naming conventions, etc are really nothing more than aesthetic flaws and not "deep" [1] as the author suggests. After all, human language is inconsistent. After awhile you just get used to it and don't think about it anymore. Programming languages are no different.

I agree with Marco that it will take "years to master" whatever he chooses next. I always scratch my head at these "I learnt Python in a day" claims you often see around here. No, you didn't learn Python in a day. You learnt the syntax for a for loop in a day. Idiomatic Python takes much longer.

I don't agree that choice is the reason people don't use Linux on the desktop. Desktop Linux is the reason people don't use Linux on the desktop. I'm sorry but it's truly awful and probably won't ever get better. In the absence of product direction you have us geeks making everything configurable because, you never know, you may want to write your own window manager (and knowing us geeks, no two will agree on what's right) so you have no consistency, no grand UI/UX design and it's just terrible.

I use Linux/Ubuntu at work basically because I have to. There are advantages on having your dev environment mirror your production environment and Linux (over OSX) does actually have a package system (it's a messy hack on OSX) but I certainly don't like it.

The only computers I use that I truly enjoy using are my iPad and my Macbook Air.

Fear of the wrong choice isn't I believe what motivates most people. Fear of looking like an idiot? Sure. But that's different and will probably be the case with anything new.

People don't tend to weight up two or more options, decide which is best and go with it. They tend to use the first thing they come across until its flaws (perceived or actual) outweigh the "cost" of transition and appearing like an idiot for awhile.

[1]: http://me.veekun.com/blog/2012/04/09/php-a-fractal-of-bad-de...

Re:PHP Addiction by antihero on Friday June 29, 2012 @02:54PM (#4178379)
Desktop Linux is actually fucking fantastic if you are prepared to take up messing around with it as a hobby. It requires commitment, time, and and open mind, but fuck, I've just sorted out xmonad, I have my dotfiles syncing via git, and it's bloody amazing. Package management is bliss, and both pacman and apt shit all over homebrew (great as homebrew is), it's absurdly fast even on old hardware, it's free, it's got all the compilation tools, headers, and libraries I could need either already installed or a few keystrokes away. Not to mention the fact that it's beautiful: http://files.0xf.nl/screenshots/screenshot-2012-06-27.19%3a4...

Linux can be really, really awesome, if you're prepared to spend time making your work environment great.

Lastly, all this time is not wasted, you end up learning so much stuff that you can apply to every where else - because of my linux knowledge I often find myself helping out my friends who use OSX but don't understand things like headers and libraries.

Re:PHP Addiction by nuclear_eclipse on Friday June 29, 2012 @04:14PM (#4178815)
I'm a longtime fan of Linux and have used it as my desktop of choice for years, but apparently you and I have a different idea of what "beautiful" is. That screenshot is a ghastly smattering of black, grey, and red, with no unified look or feel. Sublime Text is really good looking in its own right, but that overall desktop doesn't look appealing to me.

Granted, I use Gnome Shell for my desktop of choice, and find that much closer to my definition of "beauty", while KDE4 is busy chasing some idea of beauty that more resembles a mish-mash of Win7 style glass that spends more time distracting my eyes than allowing me to work, so take my opinion with a grain of salt.

I think OSX has come closest to the mark of "beauty" from a desktop environment, but it's such a terrible window manager compared to X11 that I can't stand using it except when I have no other good choice. Even then the only thing keeping me from insanity is a set of third party window managing tools that still only get me about 50% of the way to where I want to be.

Re:PHP Addiction by planckscnst on Friday June 29, 2012 @08:41PM (#4179951)
It's a nitpick, but X11 isn't a window manager; it's just a graphics layer - more like OS X's Quartz. If you run Gnome Shell with compositing enabled, your window manager is Mutter; if you run Gnome Shell in fallback mode, your window manager is Metacity. That is, unless you change it, and that is a reason I love Linux.
Re:PHP Addiction by nuclear_eclipse on Saturday June 30, 2012 @04:42PM (#4182768)
Very true, I misspoke, and meant more in the terms of "standard X11-based window managers", which all tend to share the same basic set of features, eg, highlight/middle-paste, alt-dragging to move windows, etc.
Re:PHP Addiction by naner on Friday June 29, 2012 @04:21PM (#4178861)
Gnome shell, while still somewhat unfinished, has some very cool ideas. I really like the JavaScript shell extensions that you can enable/disable right from the Gnome Shell Extension website. I was surprised when I stumbled on that.
Re:PHP Addiction by antihero on Monday July 02, 2012 @02:11PM (#4190057)
> but apparently you and I have a different idea of what "beautiful" is

I'm sure we do, I'll justify what I claimed, though - the colour scheme is unified across the entire system, fonts are readable, the borders are thin and the windows have a little spacing so it isn't too crowded. I've toyed with a lot of aesthetics, and I'm quite happy with this one at the moment.

Yes, it's very information heavy, but it suits the way I work, I find it visually appealing (though I can understand why people who like OSX's aesthetics would dislike it), but quite a lot of thought has gone into how it looks :)

Re:PHP Addiction by laconian on Friday June 29, 2012 @06:29PM (#4179464)
Do you even notice the "beauty" after spending a week with it?
Re:PHP Addiction by x3c on Friday June 29, 2012 @10:55PM (#4180312)
You notice ugliness everytime you use it. The beauty in UX/UI/Window Manager lies in it just being there, not distracting but complementing one when he/she is working.

That's my definition of beauty. I can go days without noticing it and if I take a step back and take in the whole experience, I find the beauty.

Ubuntu does it for me. Especially because I can take time to make it beautiful for me and I can have a free hand while doing it.

Re:PHP Addiction by pooriaazimi on Saturday June 30, 2012 @03:15AM (#4180985)
No, but the opposite is true. I curse on top of my voice every time I have to use Windows (which is disgustingly ugly in my opinion).
Re:PHP Addiction by flatline3 on Friday June 29, 2012 @04:01PM (#4178751)
Spending a bunch of time to make my environment work great (and keep it working great) is the opposite of what I'd consider "fantastic".

This is why I dropped Linux/BSD on the desktop over a decade ago, and switched to something I don't have to think about, and instead I can simply use to get my actual job done.

Re:PHP Addiction by tikhonj on Friday June 29, 2012 @06:56PM (#4179573)
In my experience, I have three choices: I can have a poor Linux environment with no work, a better but still mediocre Windows/OS X environment with little work or a good Linux environment with a bit of work.

The reason I don't use Windows or OS X any more (and I've used both extensively in the past) is simple: sure, both are easier to set up (with a new computer, there is no set up). But both are strictly less productive than a good Linux setup is.

The reasoning is simple: setting up a computer is a basically an O(1) operation. Sure the constant may be high, but it's just that: a constant. On the other hand, the drain on productivity of using OS X or Windows is in O(n) where n is how much programming I do. And, happily, I do a lot of programming.

So I've never understood the rather condescending argument of simply getting your actual job done. People using Linux aren't all shortsighted or masochists! We use it because we want to get real work done faster.

Re:PHP Addiction by flatline3 on Friday June 29, 2012 @08:04PM (#4179821)
I'd disagree that setting up the computer is an O(1) operation, because it ignores maintenance. Changes, additions, upgrades, new hardware, new software.

I'd also disagree that Linux is objectively faster for getting "real" work done. An example to illustrate the point: I've been using Ubuntu on and off, and tried to set up IntelliJ to match my Android development environment on Mac OS X.

First of all, the installation process sucked compared to drag-installing on Mac OS X. I had to download a .tar.gz, open up the terminal, run an installation shell script to create the requisite desktop files to make the app visible in the GUI.

Then, once I had it installed, the fonts all looked like crap. I spent about half an hour trying to track down how to make OpenJDK fonts on Ubuntu not look like crap, before finally giving up and resigning myself to the ugly UI. I found lots of people with the problem, but not many solutions.

Stuff like this happens all the time. Before Mac OS X, I resigned myself to dealing with this kind of regular crap. Now, I expect an application to drag-install and just work correctly.

I'll try to get ahead of some common arguments I've heard regarding app installation:

At this point you might start arguing that I should be using software from the official APT repositories, or something. That's a broken model. It's ridiculous to require the OS vendor to maintain an integrated repository of every piece of software available for the platform. It's not sustainable, and it means stale software and extra trouble if the software that would make my job easier (programming, right?) is not open-source and doesn't fit the OS vendor's software licensing ethics.

Then you might argue that I should use a third-party APT repository to fetch dependencies, which means that first I have to find such a repository, then I have to update a bunch of annoying configuration, and lastly I have to trust that their apt repository won't steal precedence on a system package. You can prevent that precedence problem with more configuration, but that's even more complicated.

No thanks. I'll take drag-installs, or better yet, the app store. I realize that Ubuntu is trying to go in this direction themselves, but it's not there yet. I'll reconsider when and if it they ever reach a level of working integration on par with Apple's.

Until then, I'm going to use IntelliJ under Mac OS X with nice looking fonts.

Re:PHP Addiction by tikhonj on Friday June 29, 2012 @08:40PM (#4179950)
In my experience, Linux is actually easier to maintain.

For example, when I was using OS X (several years ago, now), I could not figure out how to update Java. Apparently it involved using the "Software Center", but it didn't actually work, so I was stuck with the old version. So the project I was working on in Windows at the time just didn't work on OS X because it was using new APIs. Absurd! I've never had a problem like that on Linux.

More recently, I tried to install Git on OS X (without administrator access). It was a horrible pain, so now I only ever log on to the Linux servers at school.

Also, there is no way "drag install" is easier (after learning about it) than "yum install", or whatever your distro provides. I don't have to find anything to drag; if I want to install something, I can just type its name in an voila, I have it. What about programs not in the repository? Well, they're easy too, assuming the vendor packaged it up for you (but you have to assume the same on OS X). I needed to install a beta version of MongoDB recently; all I had to do was download the RPM, click on it and enter my password.

Now, I agree that Linux alone does not make you more productive. But a Linux configured to do exactly what you want? Now that's productive! On OS X, I can't have a full-screen program on one screen and a couple of programs on the other. On Linux (at least with KDE), that is just a couple of settings away. And, to me, that's extremely important: I want to maximize my Emacs space as much as possible on one monitor while having a browser and some other stuff open on my other screen. I've already gotten rid of the flanges, the tool bar and the menu bar of Emacs; it seems silly to have window borders and the annoying OS X top bar still there!

However, the point isn't that any one feature (like the full-screen windows) is important to everybody. Rather, the point is that you can set pretty much any feature that is important up. Sure it's more difficult to configure than OS X--but you can actually configure it! That is exactly what I was talking about when I said O(1): to get a computer that behaves exactly how I want it to behave is only possible on Linux and takes a constant amount of time.

Coincidentally, it isn't even strictly easier to set OS X up for some really basic things. For example, a bunch of people I know use Emacs and LaTeX for a bunch of different things. On Linux, I just type sudo yum install auctex and it gets everything for me. My friend on OS X? He spent hours trying to set everything up correctly, and I'm not sure it all worked in the end.

Also, for what it's worth, I've had the best luck with fonts on Linux. Not only do they look great, but the one I use for programming actually supports all the symbols I need. I want to be able to read and use Greek letters and all sorts of math symbols without worrying, and Deja Vu is the only set of typefaces I've found that let me do that. Deja Vu Sans Mono is also a great looking typeface for code--certainly my favorite of all the different ones I've tried on all of the platforms.

Re:PHP Addiction by flatline3 on Friday June 29, 2012 @10:34PM (#4180251)
Reading your comment has reaffirmed my decision to drop Linux as a daily desktop OS.

I remember everything you're describing from 10 years ago, and if things are still operating that way, then I'm glad I'm not using Linux.

It's clear from your comment that you don't understand how to use OS X as a developer. I used the BSDs and Linux on the desktop for most of the 90s, and have stayed current with Linux on both servers and desktops (though I don't ever use it by choice on my own). I don't think you're equipped to make a fair comparison.

Re:PHP Addiction by tikhonj on Friday June 29, 2012 @10:56PM (#4180317)
Right, an ad hominem. Great.

I did use OS X for Java development for a whole year. Moreover, I've had to use it a little bit recently at school and work, so I've played around with the newest versions. If that isn't enough experience to "understand" OS X, I'm not sure what is.

Not much else to say here, because all you've done is act condescending and solely attack my perceived credibility. Because, obviously, if I didn't like OS X, I just didn't understand it!

Re:PHP Addiction by flatline3 on Friday June 29, 2012 @11:11PM (#4180343)
> Because, obviously, if I didn't like OS X, I just didn't understand it!

No, you just plain don't understand how to use it, so there wasn't really any room left to discuss its relative merits. Whether or not you liked it is irrelevant given that your judgements were based on an acquired understanding of Linux, and a terse at best understanding of Mac OS X.

Let's just take your git example:

> More recently, I tried to install Git on OS X (without administrator access). It was a horrible pain, so now I only ever log on to the Linux servers at school

How exactly was it more difficult on Mac OS X? Did you try to ./configure && make && make install by hand, just like on Linux-sans-admin-access? Or did you try to use MacPorts' or homebrew's support for running without admin access, and simply tried '(port|brew) install git'?

Or, let's talk about Java:

> I did use OS X for Java development for a whole year.

During that whole year, you never stumbled onto Apple Menu -> Software Update? It runs automatically, you don't even have to invoke it manually.

You never googled "Mac" and "Java" and determined that Apple provided the Mac port of Java? Assuming this was in the time period of the 1.5 release, you never found Soylatte using Google, and used that?

Or, your friend with the LaTeX problem:

  port install texlive
Works fine.
Re:PHP Addiction by tikhonj on Friday June 29, 2012 @11:37PM (#4180433)
For Git, I just followed some examples I found online. I don't remember the exact procedure, but it didn't work. After around an hour of trying I just gave up. In fact, I found it just as difficult as trying to install Git on the OpenSolaris servers, which is saying quite a bit.

As for Java, I couldn't update despite using the Software Update menu. It worked on Windows, but OS X just hadn't gotten around to adding it. And, as is usually the case with Apple, there was no good way around it: since Apple hadn't update Java, I couldn't just install it myself. (Or, at least, there was no obvious way of doing this.)

I don't know exactly what my friend tried to install AucTeX and the rest of the LaTeX ecosystem, but he certainly did not find it easy. And this is somebody studying CS at a fairly good university: certainly not unintelligent or unfamiliar with tech.

Over all, your descriptions make OS X seem worse than Linux in the very areas it supposedly excels in!

Re:PHP Addiction by flatline3 on Saturday June 30, 2012 @12:38AM (#4180619)
> For Git, I just followed some examples I found online. I don't remember the exact procedure, but it didn't work. After around an hour of trying I just gave up. In fact, I found it just as difficult as trying to install Git on the OpenSolaris servers, which is saying quite a bit.

I installed git on a coworker's computer in a couple minutes today, so I don't know what to say.

> As for Java, I couldn't update despite using the Software Update menu. It worked on Windows, but OS X just hadn't gotten around to adding it. And, as is usually the case with Apple, there was no good way around it: since Apple hadn't update Java, I couldn't just install it myself. (Or, at least, there was no obvious way of doing this.)

It wasn't that Apple hadn't "added" it, there simply wasn't a port of that version of Java to Mac OS X, because they needed to port it. If someone external to Apple had produced a port (like, say, Sun), you could have installed it, exactly in the same way that we install Oracle Java today.

Someone did eventually produce a partial non-GUI port, and it later became the base of Oracle's officially supported Mac OS X Java: http://landonf.bikemonkey.org/static/soylatte/

This has little to do with Mac OS X being somehow broken, and a lot to do with the fact that Sun only provided Java binaries for Solaris, Linux and Windows.

For Java 7 on, Oracle will be supporting Java for Mac OS X directly.

> I don't know exactly what my friend tried to install AucTeX and the rest of the LaTeX ecosystem, but he certainly did not find it easy. And this is somebody studying CS at a fairly good university: certainly not unintelligent or unfamiliar with tech.

I'm not sure what intelligence has to do with it. It sounds like he just didn't know what he was doing, and ignorance has little to do with intelligence.

If he'd approached Linux and had never read up on "yum" or "apt", I imagine he'd be equally stymied.

> Over all, your descriptions make OS X seem worse than Linux in the very areas it supposedly excels in!

I don't see how, but I imagine we're talking at cross-purposes at this point.

Re:PHP Addiction by crazygringo on Saturday June 30, 2012 @01:42PM (#4182258)
I don't know... I think you picked some awfully bad examples.

Updating Java on OSX is trivial (download & run), no idea what problem you ran into with git, OSX has full-screen apps and multiple desktops, and OSX has always had the nicest font support and type rendering of any OS -- Apple has always been at the forefront of that.

Re:PHP Addiction by tikhonj on Saturday June 30, 2012 @04:26PM (#4182725)
OS X does have full screen apps and does support multiple monitors, just not at the same time. Which is just absurd.

The problem I ran into with Git was simple: I could not figure out how to build it from source or install it without administrator privileges. After about an hour of screwing around, I just gave up and sshed into a Linux box instead (both were for school).

Updating Java was an issue back when I was doing Java development. I simply couldn't get the version of Java I needed, period. I don't see how it can be a bad example when that's exactly what happened. I think Apple has since given up on packaging Java themselves, which probably ameliorated the issue.

As far as fonts go, I have no doubt OS X has decent font support. My point was that Linux also has great font support these days.

These aren't random problems I heard about: these are actual problems I've personally experienced. I definitely had a higher density of problems per unit time spent on OS X than on Linux or Windows, which says quite a bit.

Re:PHP Addiction by el_presidente on Saturday June 30, 2012 @10:22AM (#4181679)
I remember having ugly fonts on Linux... somewhere around 1998.

It sounds like IntelliJ has garbage Linux support and you're blaming the OS for it.

Re:PHP Addiction by antihero on Monday July 02, 2012 @02:13PM (#4190063)
Judging Linux by what Java looks like is pretty unfair. Java looks fucking horrible on Linux.
Re:PHP Addiction by samspot on Friday June 29, 2012 @05:01PM (#4179075)
"Linux is only free if your time is worthless"

Had to do it. I like linux a lot, but It doesn't make the quote false.

Re:PHP Addiction by jrockway on Friday June 29, 2012 @05:38PM (#4179238)
OS X is only $39 if your time is worthless.

(See what I did there? Linux, OS X, and Windows all enable infinite tweaking. No setup will ever be perfect, and making it closer to perfect takes time. If all you want is a web browser, that's a click away in every major OS.)

Re:PHP Addiction by rimantas on Saturday June 30, 2012 @08:43AM (#4181471)

  > See what I did there
I do. Comparing apples and oranges.
Re:PHP Addiction by beefsack on Friday June 29, 2012 @11:19PM (#4180370)
I'm actually quite the opposite, I've been a long time Linux user (Fedora, Ubuntu, Debian, and more recently Arch) and recently I decided to dive head first into OSX for work and play.

OSX is beautiful, it's smooth, and it can run a lot of my games too. But, just like Windows, it lacks functionality. Setting up a MAMP server with my required PHP extensions for work was an absolute nightmare even with Homebrew. Even when working with my Ruby projects I was struggling, when some gems required certain libraries to be installed, it was a nightmare to install them too.

Not to mention installing software and keeping it up to date was a pain too. Once you become used to relying on robust package managers it's very difficult to turn back.

Linux is designed to be powerful and functional foremost, and that's what makes it fantastic.

Re:PHP Addiction by peterhost on Saturday June 30, 2012 @08:30AM (#4181450)
Keep homebrew for standalone tools (recode, sntop, whatever). Then use rpm for ruby, perlbrew for perl, pythonbrew for ... And setup the defaut macosX apache (which has php5.3 and pear and whatever already here) work for your user account. See : http://echodittolabs.org/blog/2011/09/os-x-107-lion-developm...

Same on any nix system I use : sandboxing is the way.

- Want to use hg-git for mercurial, dont, homebrew that !! Build it in your ~/bin/ or in your $HOME sandbox, give all PATHS in your $HOME precedence, and rejoice.

- need mysql, postgre,... Don't homebrew that !! Either build it, or use the Macos dedicated installer with propper service installation, on dedicated port.

- etc,...

All in all, Homebrew, Fink and Macports are great for one thing : showing you how to patch the default tgz, saving the user hours of work for his custom, sandboxed install of any software (which as itself has been a life saver, for myself, on many an occasion).

Macos still is, as far as i'm concerned the best laptop platform for someone who has to use licenced software (external job/office constraint) but also needs a nix (bsd) environment. Otherwise, what can't you do with the default Ubuntu 12 LTS (i guess you agree) ? Macos, sure, is's on its way to become worthless as The Lion slowly sandboxes the user out of the OS, but tat's another story.

EDIT : and let it be said that OF COURSE, I agree with you that aptitude, yum and the like have no decent equivalent on the Apple/Microsoft closed platforms.

Re:PHP Addiction by smokeyj on Friday June 29, 2012 @02:12PM (#4178118)
> Linux (over OSX) does actually have a package system

I found running a VM on my mac to be the best of both worlds. Plus you can backup and distribute your VM so the entire team develops on the same setup.

Re:PHP Addiction by larrywright on Friday June 29, 2012 @05:51PM (#4179297)
Agreed, though I would suggest using Chef + Vagrant rather than using a "master image" approach. It's much more maintainable in the long run.
Re:PHP Addiction by fideloper on Friday June 29, 2012 @04:41PM (#4178977)
+1 !!!
Re:PHP Addiction by mmackh on Friday June 29, 2012 @03:11PM (#4178480)
>Is it my imagination or is Marco the king of writing blog posts that are quick reactions to whatever is trending on HN?

From the impression I get of Marco whilst listening to his Build and Analyze podcast, is that he does have a lot to say about the technical aspects of his work. However when he does, it is often written/spoken out as a response to a question. The constant talk about PHP in recent weeks has probably triggered something he's been thinking about for years.

Re:PHP Addiction by pbiggar on Friday June 29, 2012 @03:21PM (#4178541)
> Linux (over OSX) does actually have a package system (it's a messy hack on OSX)

I wonder if you've tried homebrew? It's really really good, esp compared to the horrors of MacPorts.

Re:PHP Addiction by jaequery on Friday June 29, 2012 @03:37PM (#4178627)
php is great for what it does. ruby is great for what it does. python is great for what it does. at the end, it's all about preference.

someone who has mastered in PHP will no doubt be a lot more proficient in developing apps than a junior/intermediate python or ruby developer. same can be said for reverse.

it really all comes down to knowledge and experience.

Re:PHP Addiction by fideloper on Friday June 29, 2012 @04:40PM (#4178973)
I personally love having Mac OSx and Ubuntu Server running in a VM. Best of both worlds, IMO. I don't have to mess up my Mac install, and I can dev in a "real" linux environment.
Re:PHP Addiction by jaequery on Friday June 29, 2012 @11:40PM (#4180439)
php is like the mysql of databases. everyone hates you for using mysql, but everyone uses it.
Re:PHP Addiction by drivebyacct2 on Friday June 29, 2012 @02:59PM (#4178414)
>Desktop Linux is the reason people don't use Linux on the desktop. I'm sorry but it's truly awful and probably won't ever get better. In the absence of product direction you have us geeks making everything configurable

Have you tried Unity or G-S lately? I'm not as willing to argue G-S has as clear a direction as Unity, but they both ship with a very limited amount of configurability and they're both insanely easy to start using even without background knowledge.

Re:PHP Addiction by fromhet on Friday June 29, 2012 @05:24PM (#4179167)
This is true.

Anecdote: I've used Ubuntu for a long time, but due to some nonfree applications dependence on mac/win I've gotten myself a apple laptop. It's mostly the same, I use a browser, terminal, vim and a thousand silly apps but they are about the same amount of config-time.

The biggest difference is that Ubuntu ships with APT and a lot of tools that are good for a hacker, but it's not to hard to get equivalents on osx.

Summary: Mac OS and Ubuntu are more on par in ease to use than I could have believed before I tried.

Re:PHP Addiction by benihana on Friday June 29, 2012 @02:43PM (#4178315)
>I use Linux/Ubuntu at work basically because I have to. There are advantages on having your dev environment mirror your production environment and Linux (over OSX) does actually have a package system (it's a messy hack on OSX) but I certainly don't like it.

I'm very surprised that Google doesn't provide some kind of consistent dev VM environment that is similar to prod that developers can SSH into.