News for hackers. Stuff that matters.

jz

Re:Write Less Code on Tuesday June 26, 2012 @02:18PM (#4163376)
> When the number of "moving parts" created by your abstractions outnumbers the actual bits its abstracting, then you know your design took the wrong turn somewhere.

This is an interesting point which I agree with and is usually where I end up. In the past I've started from the opposite end, creating multiple modules, class hierarchies, etc. This future proofing has made things harder for me to follow/understand when reading at a later date. It has become tiresome and now I consciously start at the other end, making the simplest thing that could work. Layers of abstraction then come naturally as needed.

Re:Write Less Code on Tuesday June 26, 2012 @12:20PM (#4162697)
Part of the zen of Python is "Flat is better than nested". Until recently, I always thought of this at a code block/function level. Recently I realized that this is also important when modularizing and adding layers of abstraction. The more layers of abstraction (from foo.bar.baz import Baz) you add, the more code you write and have to "keep in your mind". This presentation by Jack Diederich at PyCon 2012 really opened my eyes to the potential problems of adding layers of abstraction via modules and classes: http://pyvideo.org/video/880/stop-writing-classes
Re:Continuous Cache Warming for Rails on Thursday March 22, 2012 @02:23AM (#3738672)
I needed this in a rake task under Rails 2 a while back; I ended up doing the following:

  require 'action_controller/integration'
  app = ActionController::Integration::Session.new

  module CurrentUserHack
    def current_user 
      @user ||= User.look_up_my_user_here
    end
  end
  ApplicationController.send :include, CurrentUserHack
Now you can make authenticated requests in rake tasks and presumably in script/runner.
I am genuinely surprised at how much others spend on software. I started totaling up his list (excluding monthly services like dropbox) and stopped when I reached $500, which was right around Cornerstone.
Re:Django nonrel is no longer being maintained on Thursday November 24, 2011 @01:06PM (#3274984)
Re:Apple now holding more cash than USA on Friday July 29, 2011 @04:55PM (#2823757)
You down voted my question but still did not provide a concrete example.
Re:Apple now holding more cash than USA on Friday July 29, 2011 @01:24PM (#2822840)
> Money moving from one place to another does not always help the economy. When money flows from the corporate coffers directly into the private accounts of its executives, generally little of that money actually flows into the greater economy.

Can you give an example of how this would hurt the economy?

EDIT - those that down voted, mind giving a reason?

Re:If you gaze into nil, nil gazes also into you on Thursday July 28, 2011 @04:53PM (#2818879)
When I first looked at Haskell, the 'Maybe' concept was new to me and seemed like a useful concept for other languages. http://haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0...
Re:Fedora 16 To Use "Btrfs" Filesystem By Default on Thursday June 09, 2011 @12:45PM (#2637750)
I agree that the change will cause a lot of pain, however early adopters tend to have a high tolerance for pain. If you don't want to deal with the pain or are running a server (your EC2 mention sounds like a server), you probably want to avoid cutting edge distros like Fedora.
Check out Mondrian: http://mondrian.pentaho.com/ I used it a couple years back at a startup. It's written in Java and IIRC works (only?) with MySQL. Mondrian took a bit of work to get setup, mostly due to my lack of OLAP knowledge at the time, but once setup, it was pretty nice and fast. I think it uses materialized views for the cube data. I'm actually working on a new project where an OLAP will be nice. Thanks for posting Brewery, I'll definitely give it a spin. OLAP's don't get much love, but are very useful for certain types of problems.
Re:GitHub: Block the Bullies on Wednesday June 01, 2011 @12:16AM (#2605933)
Background: http://sheddingbikes.com/posts/1306816425.html

In all fairness, the guy was being a dick (no pun intended) to Zed. However, Zed should have kept the insults to the troll and left Github, Powerset, Engine Yard, and the Ruby community out.

Looks interesting, however I really dislike iTunes' "everything under then sun" motto. If you are looking for something much more lightweight for playing music, check out mpd http://mpd.wikia.com/wiki/Music_Player_Daemon_Wiki . There is a really nice Mac mpd client called Theremin: http://theremin.sigterm.eu/
Re:Fighting micro-burn-out on Monday May 23, 2011 @11:48AM (#2576316)
The girlfriend mentions seemed irrelevant and out of place. I've noticed lately that more and more technical bloggers try to inject this fictional writing style to draw in readers. Most of the time it's so out of place that I immediately stop reading. My preference though is terse articles for technical discussions.
Re:Cool, but obscure Unix tools on Friday May 20, 2011 @11:59AM (#2568189)
Although not as featureful as pv, try hitting CTRL+t under OS X or any of the BSDs during a long running process. It provides status of the current running process without having to prefix the command with pv. I blogged about this a while back: http://jz.posterous.com/bsd-tip-of-the-day-ctrl-t
Re:OpenBSD: a puffy in the aquarium on Wednesday April 20, 2011 @12:31PM (#2467254)
I purchased my first CD set yesterday. They provide great tools (OpenSSH, tmux, and of course OpenBSD) which save me time and money and make my life easier.
Re:Showoff on Wednesday April 20, 2011 @12:18PM (#2467197)
I work remotely 100% of the time (and not always in the same location). The use case for me is to quickly show a feature to coworkers without having to commit/push to a remote server. Especially if the feature needs immediate feedback and is not completely baked/finished.
Re:Rails 3.0.3 out - Faster Active Record plus fixes on Tuesday November 16, 2010 @12:19PM (#1910762)
I saw Aaron Patterson's presentation at RubyConf this year, which I have to say was just as funny as informative. It was essentially all about squeezing every bit of performance out of ARel. He ended up rewriting a good portion of ARel as well. If anyone is interested, the ticket with benchmarking stats can be viewed here: https://rails.lighthouseapp.com/projects/8994/tickets/5098-r...
Re:Common Programmer Health Problems on Monday August 09, 2010 @12:11PM (#1588403)
A little late to the party, but I went through a bout with wrist/arm pain for over a year. I did physical therapy for more than 6 months, saw a doctor that said I needed to have surgery on my arms, neither helped (did not have surgery BTW). I then finally saw a myofascial specialist. She identified the cause of my pain from trigger points in my upper back and shoulders. After just one visit and a follow up visit a year later, I've been relatively pian free. She basically taught me how to address the trigger points my self using a tennis ball and 'The Trigger Point Therapy Workbook' http://www.amazon.com/Trigger-Point-Therapy-Workbook-Self-Tr...

I'd definitely give this book a try since it clearly identifies which trigger points are causing the referred pain/numbness along with the ways to treat them.

Also if you are in the Chicago area, check out http://www.myopain.com/. Like I said, they were able to help me with only 2 visits.

Re:Ask HN: Dead man coding. on Friday May 28, 2010 @11:55AM (#1386749)
If you work for any employer that actually cares about you, convince them to keep you on their insurance and take a 6 month sabbatical. If they are not sympathetic to your situation, quit your job immediately since they have no regard for your well being. Try the bag and see how it goes. Make friends, travel, enjoy life. Do the things you always wanted to do. Then reassess in 6 months.

Looking at my own life the things that I feel blessed for, have nothing to do with work. After falling in love and starting a family, being rich and changing the world are no longer important. As long as I can provide for my family and raise my children in a way that would make me proud, nothing else matters.

Unplug and try the bag. There is much more to life than business success and $.

Re:Visualize the Deepwater oil spil over your hometown on Friday May 28, 2010 @11:36AM (#1386681)
I thought the exact opposite. I'm in Chicago and the spill covers a 1/3 to 1/2 of Lake Michigan. After zooming out though, it clearly would cover Lake Erie or Lake Ontario. The thing that was put in perspective for me was the shear size of the Atlantic.
Re:Ruby's Hidden do {} while () Loop on Friday May 28, 2010 @09:47AM (#1386379)
I've been programming exclusively in Ruby for almost 3 years now and came across this while I was looking at tempfile's source. I was gonna write about it but turns out this guy sums it up pretty good. I apologize since this is a news site and the post is from 2007, but it was news to me and I thought it was a very elegant hack.
Re:Problems with Firebug on Friday May 28, 2010 @08:57AM (#1386257)
I've switched to Chrome on my Mac because of its speed and quality of dev tools as well. It's a shame though since Firefox and Firebug were both revolutionary and "raised the bar".
Re:Google Chrome for Linux goes stable on Tuesday May 25, 2010 @12:49PM (#1377890)
As a BSD user, I recall some of the porting problems were because of the reliance of ALSA instead of OSS. Anybody know offhand if it still uses ALSA?
Ever wonder why Dells, HPs, and Gateways come loaded with a lot of crap software? It's because ISVs know that your typical user won't spend more than he has to. You are forgetting that Dell, HP, etc get kickbacks from the software companies.
3 years ago I bought my first Apple computer. Coming to the Apple platform, I was amazed by all the apps my fellow co-workers would buy for their Macs. Most of them were just simple stupid things that cost only a few bucks but I could never see an average non-Apple user buying. I have no statistical evidence, but it seems like Apple users are more susceptible to buying apps, ring tones, songs, and other junk. My advice would be build for the iPhone and if you get something that is very popular or making you a ton of money, then port it over.
I'm fed up with the snarkiness from Apple lovers and haters. I have several Apple products, MBP, iPhone, and Airport Base Station and I have never touted that they are superior or better than other offerings out there. I just silently go along and do my own thing and still attract tons of negative comments. There seems to be an inferiority complex in both Apple fanboys and Apple haters.
Re:Aquamacs 2.0 Released on Monday May 10, 2010 @03:33PM (#1335667)
This has been my experience too. I'm downloading now to see if performance has improved.
Re:45 Astonishing Examples of Long Exposure Photography on Friday May 07, 2010 @04:42PM (#1328703)
When I think of long exposures, fireworks and lightning come to mind. Those photos are absolutely amazing.
Re:Poll: What Browser Are You Using? on Friday May 07, 2010 @04:34PM (#1328676)
Other: Midori I use this on my FreeBSD workstation. I would prefer Chrome (which is what I use on my MBP) but Chrome on FreeBSD is not quite there.

Older »