HNHacker News
TopNewBestAskShowJobs

nileshk

184 karma · joined November 1, 2008

[ my public key: https://keybase.io/nileshk; my proof: https://keybase.io/nileshk/sigs/VRQOyMLSKOwUHU61hkAFK_sK4uknSn-LT6Tdp4zB8yE ]

http://nileshk.com

Contact: (concat "hackernews" "\100" "nileshk" "\056" "com")

submissionscomments
nileshk··on Why Rubyist Will Love Swift
Here is a Swift vs Scala syntax comparison:

https://leverich.github.io/swiftislikescala/

And also, a comparison to C#:

http://pietschsoft.com/post/2014/06/07/Basic-Comparison-of-C...

nileshk··on How to remotely debug Java and JSP with Eclipse
I would block the port using a firewall, and use a SSH tunnel to access the port.
nileshk··on My experience going from 17" MBP to 15" rMBP for programming
I was also not sure whether the 15" retina display would be as good as the 17" 1920x1200 display. I now use my 15" Retina in scaled 1920x1200 equivalent most of the time when I'm doing programming work (when I'm not at my desk using a large external monitor), and it's actually better than the 17" in that mode -- due to the way they did scaling, fonts and widgets render with more detail.

That said, there are situations where the 15" Retina 1920x1200 scaled is not as good as the 17": When I am sitting in bed (or maybe a couch), and the display is further away than it would be if I were sitting on a desk. In that situation it's not ideal, because the fonts become harder to see. But there are two potential solutions to that: If the app I am using supports zooming, just zoom the content (e.g. web browsers all do this) OR switch to the best-for-retina 1440x900 equivalent. I usually use best-for-retina when I'm not doing programming. But, I still have my 17" MBP, and it is my designated programming in bed laptop.

One of my favorite things about the Retina display is that I can arbitrarily choose resolutions without any perceived decrease in quality. This is something we had with CRTs, and didn't really have with LCDs until now.

Another potential downside: Apps that don't support the retina display look pretty terrible. They look best in scaled 1920x1200, but still not that great. The only app I use that doesn't support the retina display is Ableton Live (and it's entire UI is vector-based and can scale via a zoom setting, so you think it wouldn't be hard).

nileshk··on Apple's New Mac Pro Begins Showing Up in Benchmarks
I followed these instructions to install Mountain Lion on my 2007 Mac Pro 2,1: http://www.jabbawok.net/?p=47

Note: For a Mac Pro 1,1 (2006), you may also want to update to the 2,1 firmware depending on what CPU you are using (have to create an account and login on these forums to download the file): http://forum.netkas.org/index.php/topic,1094.0.html (The 1,1 and 2,1 are identical hardware except for firmware)

nileshk··on Apple's New Mac Pro Begins Showing Up in Benchmarks
Apple does not support CPU upgrades in the Mac Pros. You need non-standard tools to do it, it's not as easy as in a typical PC, and occasionally have to hack a firmware update depending on what Mac Pro model and what new CPU you want to use. The firmware hack is because Apple does not update firmware in older models to support newer CPUs, even though the hardware is otherwise capable of it.

I think people who upgrade their CPU in Mac Pros are a minority of Mac Pro users. I'm probably not a typical Mac Pro user (a "mid-range" tower would've been fine for me), but I bought a 2007 Mac Pro with the least expensive CPU option, then in 2012 upgraded the CPUs in it to extend it's life. The Xeon CPUs I used were ones Apple never offered, but they happen to work in the machine I had.

Also: I upgraded the graphics card several years ago, to an official Apple supported graphics (ATI 5770), but my Mac Pro model isn't officially supported by Apple (but it works fine). I also did a hack to get the current OS X version, Mountain Lion, running on my machine (it isn't supported by Apple). My Mac Pro borders on being a Hackintosh at this point.

nileshk··on The Ultimate Bookmarking Tool Is Finally Here
In my opinion, for a bookmarking tool to be "ultimate" it at least has to store the content of the web page and allow searching the content. Basically it should be a search engine that uses your bookmarks as the source of sites to crawl. This removes the burden of having to properly tag/organize bookmarks and makes bookmarks easier to find later.

Google Bookmarks does this: https://www.google.com/bookmarks/

I've been using Google Bookmarks for years and am pretty happy with it even though it doesn't look like Google is developing it any further. There are other bookmarking products that provide this as well.

nileshk··on Software Development Is Bad For Your Health
I can't read the article as the server is not responding, but from what I gather it's about RSI, carpel tunnel, etc. I'd like to present an alternate viewpoint and suggest that RSI is not caused by physical action, such as typing on a computer keyboard or bad posture, but rather it's root cause is psychological (with the understanding that physical things are happening, but they are controlled by your mind).

I suggest reading "The Mindbody Prescription" by Dr John E Sarno. Here is one of the better summary of the ideas (in Word doc format): http://www.rsi.deas.harvard.edu/handout.doc

Personally, I have been pain free for over 10 years thanks to this.

Here is the story of someone else who cured his RSI pain using this method, it is very similar to what I experienced: http://aaroniba.net/articles/tmp/how-i-cured-my-rsi-pain.htm...

nileshk··on Slate: a Mac OS X window manager for power users
I feel like this kind of thing extends the platform rather than fighting it. I don't use Slate (yet), but currently use a modified version of ShiftIt (I added resizing to percents) which does some window management. OS X lacks a way to resize/arrange windows without the mouse and this kind of software fills in the gap. I don't feel like this is fighting the platform (especially since Apple does not provide an alternative to this), but rather it is building on top of the platform.

I also use Butler for another option for app switching/launching (Spotlight doesn't do this how I want it) and also to make Emacs PGUP/PGDN keys (Alt-V/Ctrl-V) work in every app. I also configured Cocoa for more Emacs-like functionality to extend the existing Emacs keyboard shortcuts it already supports. And I use BetterTouchTool to add volume up/down/mute to my mouse buttons.

That's a lot of changes to the way the default platform works, and I have grown to depend on all these modifications, but it makes OS X work more like how I want it to work, and I think that is absolutely worth doing. I wasn't really completely happy with OS X until I had these things in place. That these changes are made through 3rd party software without any horrible hacks (that I know of) makes me feel like this is extending rather than fighting.

On the otherhand, I do occasionally jailbreak my iPhone, and generally end up reverting back to stock, because that is fighting the platform.

nileshk··on Adobe almost does something amazing by accident
My understanding is that they wanted to shut down the product activation servers for CS2, so they released an update for it that removed the product activation check (and made the updates available on a publicly accessible web page), so that existing CS2 users could keep using it without things breaking.
nileshk··on JetBrains Doomsday Sale - 75% off for 24 hours only
In the past, the deficiencies of their Emacs keybindings have made it difficult for me to switch (from Eclipse which gets this mostly right, and has the Emacs+ plugin if you need more Emacs features). But IDEA 12 made some big progress in this area: http://blogs.jetbrains.com/idea/2012/03/more-emacs-for-the-f...

I've only used it briefly, but the only thing missing that bothered me was lack of "Quit" action (defaults to Ctrl-G in Emacs) which I use frequently, but they appear to be getting all the important things correct.

I'm not sure whether these improvements have made it to their other tools besides IDEA 12.

nileshk··on JetBrains Doomsday Sale - 75% off for 24 hours only
I'm an Eclipse user who has always thought about switching to IDEA, but the poor Emacs keyboard shortcut support has made it difficult to adapt to. With IDEA 12, they've made some major progress in Emacs keyboard shortcut support ( http://blogs.jetbrains.com/idea/2012/03/more-emacs-for-the-f... ). It's still missing at least one minor thing that I'm used ("Quit" action, by default that is CTRL-G in Emacs), but I may be able to get used to that or find a workaround. At $50, I can't pass this up just in case I do end up switching to IDEA.

I occasional use Python (and sometimes this involves Django). I wonder, does PyCharm have any extra features that make it worth getting in addition to IDEA? Or is IDEA good enough for this already?

nileshk··on Apple - Think Twice
Yeah, I'm a little concerned about updates breaking things. The good thing about this hack is that you don't have to modify your installed OS X system. If I understand correctly, the Chameleon bootloader emulates EFI64 and fakes OS X into thinking you booted an EFI64 system. So I think the likelihood of updates breaking things is much smaller than that of Hackintoshes, for example.

Nevertheless, I'm going to try to make sure I have a full backup before doing any major OS X updates. I also have both a Lion backup (as well as an old Snow Leopard backup) that I can boot up in case I need to.

nileshk··on Want to learn to code? Don't copy and paste, type out other people's code
I agree with this especially when you are doing tutorials for this reason: when you type out code, you inevitably make typos that cause bugs. This forces you to learn what some of the common possible error conditions are and forces you to learn to find and resolve them. Learning these things when you have the safety net of a tutorial is ideal, because if you can't figure it out you can always compare with the tutorial's code and learn what your mistake was, and you still get the benefit of learning about the particular error you experienced.
nileshk··on Apple - Think Twice
If you have the right video card, you can get Mountain Lion running with these instructions: http://www.jabbawok.net/?p=47

This worked for me with my 2006 Mac Pro 1,1 w/ an ATI HD5770 graphics card. I do have an issue where it often doesn't come back from sleep, so I never put it to sleep, but other than that it's been flawless so far. I haven't spent any time looking into the sleep issue, maybe it's a solvable problem.

By strictly hardware performance standards, the Mac Pro 1,1 and 2,1 did not deserve to lose support so soon, and are still more than adequate. Especially the 8-core versions, which have benchmarks higher than many 2012 Macs.

If you have a 4 core model: I researched putting in replacement CPUs a while back (but never went through with it). Replacing a CPU in a Mac Pro is not the easiest and is a bit of a pain from what I hear, but it is possible, and if you have 4 cores right now you can get a serious CPU performance boost with the right 8 core CPU upgrades (2 x 4-core CPUs, that is). There are many options that will will work. If you're interested, I can give you more details on which CPUs work.

nileshk··on Petition Google for iOS Maps
Google executive Jeff Huber says: "We look forward to providing amazing Google Maps experiences on iOS."

While this more than likely means that they are going to create an app, it leaves it open enough that it could just mean that they're going to improve their mobile web app version of maps.

nileshk··on Skeuomorphism
https://ccrma.stanford.edu/software/snd/snd/snd.html

"Snd is a sound editor modelled loosely after Emacs"

As an Emacs user, I am very much intrigued and will have to try this out. Thanks!

nileshk··on Skeuomorphism
The audio plugin example is typical because the vast majority of music production software exhibits a great deal of skeuomorphism. I personally don't like this because it increases the cognitive load in trying to figure out an interface, and I don't feel like it helps make things more intuitive than a non-skeuomorphic interface -- rather the opposite, it becomes more confusing.

This is one of the reasons I like Ableton Live ( http://www.ableton.com/suite-8 ): it has a simple, consistent user interface elements and the entire user interface happens to be vector based. Not only is it easy to navigate and understand, but the fact that it is vector based allows it to have a resolution-independent interface that can be zoomed in/out. Which addresses another problem with music production software: they tend to use tiny fonts and other UI elements which makes it hard to read when used with a high-PPI monitor and/or when the monitor is far enough away from the user (which seems to often be case in many studio setups). And once you've done a highly graphical skeuomorphic interface that uses lots of bitmaps, scaling doesn't always happen smoothly.

On the other hand, many people like skeuomorphic interfaces when they've had past experience with actual audio hardware. Reason ( http://www.propellerheads.se/products/reason/ ) is one such example where the interface is so skeuomorphic that is often considered a hardware simulator. People who have past experience with such hardware often love Reason because they are able to draw upon past experience to understand the interface. I suppose in this case, this is a very appropriate use of skeuomorphism.

People like me who don't have experience with such hardware aren't necessarily going to appreciate this, though some people will enjoy it even without past experience with hardware because some people simply enjoy visually appealing graphical interfaces. So it's a tough call which group of people is in the majority and who you want to cater to. Personally I like music/audio software to focus on it's core task of being a music creation tool, and less on being graphically impressive; but that's just me.

nileshk··on Windows 8 productivity: Who moved my cheese? Oh, there it is.
> I disagree; the entire point of the Windows key is that it isn't interpreted by applications. It provides instant keyboard-driven access to OS/shell functions (i.e. cross-application functions), and I love it.

I get that, and I understand what Microsoft is doing, but I don't think the two usages are mutually exclusive. So it can be used for all it's current functions, but individual applications could assign shortcuts to Win + [modifier key(s)] + [key] or even Win + [key] (providing warnings if it conflicts with an existing OS/shell shortcut). Users should be able to override existing OS/shell shortcuts for something else if they want. I understand that this means that if Microsoft introduces new Window key shortcuts in future releases, this could potentially conflict with existing application and user assignments, but I think the benefits make this worth it. As it stands, Microsoft is wasting the full potential of the Window key. Maybe there are some guidelines they could establish that would leave things open enough for future releases (e.g. applications shouldn't assign Win + [key] combinations, it must be Win + [modifier(s)] + [key]).

In OS X, you have some cross-application functions using the Command key, but applications can use the key too, and when there is the possibility of shortcut configuration, users can choose whatever [modifier(s)] + [key] combination they want. Granted, many of the usages of the Command key are for in-application shortcuts, but I don't see the huge benefit to isolating a single key for only cross-application functions that is worth giving up a potential modifier key. I'm ok with using multiple modifier keys for new cross-application functions that may come in later OS versions, or sorting out conflicts that may arise. I'm ok with the "cheese" moving a bit, and I think those who aren't wouldn't be heavy keyboard shortcut users anyway.

Maybe there is the possibility for this in Windows already, but I just haven't seen it? Apparently One Note has it's own shortcuts that use the Window key, but that is a Microsoft application, so they may be using private APIs or something.

I haven't been a heavy user of a Linux or X11 GUI in a while, but back when I was, in Gnome/KDE/etc you could assign the Window key to whatever you wanted, and it was mostly unused by applications by default, so I was able to assign it to window manager functions, etc. The defaults of Gnome/KDE seemed to be mimicking Windows. If I went back to Linux, I would try to setup an arrangement more like OS X, or at least come up with something more comfortable for an Emacs user (e.g. Ctrl-V should do page down, not paste; I have setup OS X to act that way through a 3rd party app). The beauty of Linux is that you can configure things how you want it, and you are not stuck with what the OS designer thought was the best idea. I haven't used Ubuntu Unity, but if that happens to be restrictive, there are plenty of other window managers that aren't.

I must admit I feel the same way about Fn keys on laptops: that's another modifier key I could be using that is limited to only a handful of functions.

nileshk··on Windows 8 productivity: Who moved my cheese? Oh, there it is.
I love seeing useful keyboard shortcuts being added. I've always used various Window key shortcuts whenever I use Windows. I even use the context menu key. But I wish the Window key was more like the Cmd key in OS X. That is, I wish it was a modifier key that can be used in key combinations, and ideally have it be the primary modifier.

When you have 3 different modifier keys, this increases the number of key combinations exponentially vs 2. So take for example a cross platform IDE that is keyboard shortcut friendly, with lots of actions you can assign to keyboard shortcuts, like Eclipse. In the Windows version you only have shortcuts that can be a combination of Ctrl and Alt plus another key. With OS X (and Linux), you can have any combination of Ctrl, Alt, and Command plus another key, giving many more possibilities. I miss the lack of context menu key support in OS X, though.

As a UNIX/Emacs user, a side benefit of having Command as the primary modifier key in OS X, used for many of the typical actions, is that typical OS X keyboard shortcuts don't generally get in the way of UNIX/Emacs keyboard shortcuts, which use Ctrl and Alt as modifiers exclusively. I can use Emacs keyboard shortcuts right alongside OS X keyboard shortcuts in the same application (I'm accustomed to both; for example, I might paste with either Cmd-V or Ctrl-Y, depending on whether my right hand is on the home row or not). But I don't expect that most Windows users would benefit from that particular aspect. However, I think having an extra modifier key, available to applications, would benefit a good portion of Windows users.

nileshk··on Ask HN: How do you Backup your Personal Files?
I have multiple layers of redundancy. This is Mac-centric, but you can do something similar in other operating systems:

* I use a Time Machine to do incremental backups of my system drive which also contains any files that I don't want to lose.

* I periodically make a complete image of all my important drives. I have two copies of this. One copy stays off-site and I never have both at the same location as my originals. The other copy is local but left disconnected. I periodically rotate a copy to the off-site location. I use SuperDuper to make the images.

* I use DropBox for things I am working on and various other important files I want backed up and shared across my computers. This isn't big enough to contain the bulk of my media files (music, photos, video), but anything small enough goes here. A few of my super-important media files I keep here, like my wedding video and photos. I started using DropBox's photo syncing feature for my phone camera and am thinking of using it for all my cameras as well.

* Anything in my DropBox gets backed up by Time Machine as well on two different computers at two different locations.

I think it's really important to have at least two backups in the case that one of them fails. And one of them absolutely should be off site since a burglary, fire, hurricane, etc can potentially take them all out if they are all in the same location.

Also, it should not be possible for a remote attacker to erase all of your backups. For example, if you used a combination of Time Machine and cloud backup, an attacker could potentially gain access to your local machine, do a secure erase of all your drives including your Time Machine backup, and gain access to your online cloud backup and erase that. In a situation like that, you better hope that your cloud backup provider keeps enough backups such that you can recover erased files.

If you want to be even safer it's good to have 3 backups. One local, one off-site, and one off-site in a different city (e.g. Internet backup or shipping your drives somewhere). Now this is considering a severe worse case scenario, but having an off-site backup in the same city isn't enough, because a hurricane or earthquake could potentially damage your drives in both locations.

nileshk··on Show HN: Flutter - Control Spotify or iTunes Using Gestures thru Webcam
This is very cool. It worked perfectly even in the dimly lit room I am sitting in.

What I've been wanting and have thought about developing myself is a universal play/pause control that pauses whatever you happen to be listening to at the moment, whether it be a desktop client like iTunes, Spotify, Rdio, etc, or if it is something running in a web browser like Pandora, Soundcloud, Youtube, etc.

This app takes a step towards this in the way it handles iTunes and Spotify at the same time, by controlling whichever app had focus last.

I imagine for web browser control a browser extension would necessary. And ideally a plugin architecture would exist to allow 3rd parties to add support for additional apps.

nileshk··on TylerWM - a tiling window manager for OSX
While it's not quite the same as what you expect from tiling WMs in Linux, there is Divvy for Windows: http://mizage.com/divvy/
nileshk··on TylerWM - a tiling window manager for OSX
While it's not quite the same as TylerWM, ShiftIt works great and I've been using it for years.

I am actually using my own fork of ShiftIt, where I added being the ability to resize windows to various percentages of the screen: https://github.com/nileshk/shiftit Though my fork is off of an older version of ShiftIt (the original from Google Code), and also pretty specific to my preferences, so I'd recommend checking out the official one first. I really need to update my fork with the latest changes from the official fork, because they added things like definable keyboard shortcuts.

TylerWM looks more like what I really want, as it appears to be more like the tiling window managers you see in Linux, where it dynamically rearranges all the windows on the screen.

Also, I've tried Divvy (not open source) and like it, and you can accomplish the "percentages" thing really easily with it, but ShiftIt has been more reliable for me, so I've stuck with it.

Edit: This was also mentioned in this thread and looks pretty compelling: https://github.com/jigish/slate

nileshk··on Resolutions for programmers
> The placebo effect is real, sometimes even when the patient is aware that it's a placebo.

I actually think Sarno explains quite well why the placebo effect works in many cases. It works because the pain is caused by psychological issues to begin with, so when you receive a placebo, your mind knows to make it go away and shift to a different problem. He actually calls it a "nocebo" because it doesn't actually make it go away. For example, you may have back pain, do some kind of therapy to address it (whether it is chiropractic adjustments, massage, medication, cortisone injections, or even surgery); it goes away, but then a week later you start having wrist pain, and the cycle continues (maybe with the back pain coming back) until you address the underlying repressed emotions.

nileshk··on Resolutions for programmers
I also conquered "RSI" by reading Dr John Sarno's book (after trying everything else I could for over a year and a half). This was back in 2002 and I haven't problems since (11 years); and the problem went away in a matter of weeks. Now I type on a keyboard all day long, play guitar, bass guitar, drums, and sometimes keyboards without worrying about taking breaks or ergonomics. I do have an ergonomic computer setup (keyboard tray), but it's mainly just for comfort and speed.

I do think what Sarno writes is what is really going on in most cases of "RSI" and other types of chronic pain. It makes complete logical sense to me and makes sense of everything I experienced, even going back before I had the wrist pain (occasional unexplained back pain, neck pain, etc that would last for weeks - which I no longer have now).

nileshk··on BackboneJS ToDo list example with Spring 3.1 (no xml config) and MongoDB
The src/main/java part is a Maven convention: http://maven.apache.org/guides/introduction/introduction-to-...

This project has a "pom.xml" (Maven configuration file) in it's root directory, so it is using Maven. While you could use alternate folder structures with Maven, that requires configuration, whereas if you use the convention, Maven reads these folders by default. So if you also had a src/test/java folder, Maven would know that your unit tests are in that folder, and would automatically run the tests as part of the build.

The org/resthub/todo part maps directly to the Java package (namespace), which would be "org.resthub.todo". As darklajid said, this is a language requirement.

These deep folder structures can be annoying if you are using a regular file browser, but Java IDEs generally flatten out the packages, so that you see all packages all at once in a list, so you don't have to do a lot of expanding of subdirectories.

nileshk··on I swapped my MacBook for an iPad+Linode
Are there any tricks to getting Prompt working correctly? Ctrl seems to work good, at least the keys I tried (Ctrl-A/E/N/P/K/T). When connecting to a Linux box, I can get some of meta keys to kinda work, but most of them do unexpected things. When connecting to an OS X box, option just spits out special characters. Prompt doesn't appear to have any configuration option for what type of terminal emulation, so I guess my only options are to configure the shell I am connecting to.

I just tried the latest versions of both Prompt and iSSH on iOS 5 on an iPhone 3GS. Prompt is at least a big improvement over iSSH in this area, but, unless I can figure out how to get it to work better, it is definitely not something I'd be comfortably using for Emacs.

nileshk··on I swapped my MacBook for an iPad+Linode
The last time I tried to use SSH under iOS with the Apple bluetooth keyboard (trying different SSH apps including iSSH and TouchTerm) I found that I could not comfortably use Emacs due to various key combinations not being transmitted (I guess Vim isn't as much of a problem). One of the SSH app developers said that they were not able to trap certain keystrokes that were iOS keyboard shortcuts. Looks like this may still be an issue, as moconnor says this:

> Ctrl-X is my screen’s ‘hotkey’; it defaults to Ctrl-A but on a wireless keyboard that leaves unicode characters in the terminal - I assume this is related to Apple’s support for some common Emacs key bindings in iOS.

Is the situation any better now? Any workarounds to make this work better (e.g. configure the shell on the remote end)? How is this on Android?

I was trying this on an iPhone, but I'd imagine it handles bluetooth keyboards the same as the iPad.

Another issue I had was latency of the cellular connection (AT&T 3G); there was a very noticeable delay between keystrokes and the server receiving them and transmitting back. I imagine if you're on wifi most of the time this isn't as much of a problem, though. Or maybe you just get used to the latency.

nileshk··on Apple upgrades MacBook Pro line with faster processors, gfx cards, more storage
I'm personally hoping they redesign the MBP such that it loses the optical drive, keeps the 2.5" drive bay, and adds the flash storage from the Air (or something equivalent). A HDD+SSD combo in a laptop would be ideal. They should at least do this in the larger 17" model, if not the others.

If that never happens, I'm just going to get an Optibay or equivalent.

nileshk··on 90 Percent of People Don't Know How to Use CTRL+F (or CMD + F)
It might be worth trying incremental search in Visual Studio (it's like "find as you type"). I use it with Emacs keybindings (CTRL-S for forward search, CTRL-R for backward search), but I'd imagine you can bind it to whatever keystroke you want. There is no dialog, you simply hit CTRL-S (or whatever it is bound to), then start typing and it immediately goes to the next occurrence of what you have typed; you hit CTRL-S again to go to the next occurrence.

Incremental search changes the way you navigate text beyond using it for searches. Want to move to particular place in the text file quickly without using the mouse? Pick the most unique string near it and incremental search to move near it, then use regular keyboard movement commands to get to it (if the unique string itself wasn't where you wanted to be).

← PreviousPage 2 of 4Next →