HN user

grobolom

25 karma

Software Developer | WSI Intelligent Audit Author/Co-Founder | SuperProfundo.com @grobolom | vasja@superprofundo.com

I'm a graduate student at Columbia and a part-time/full-time software developer. I'll be moving the Bay Area this winter.

Posts6
Comments42
View on HN
PHP Commandments 13 years ago

You know we've all seen helper.php files that are so monolithic

Yes. This has nothing to do with flat functions vs. classes. I've seen 'helper' classes get shitted up just as much as function files.

My point is that it doesn't matter. Many projects don't require heavy portability, and in either case, bootstrapping a namespaced shim next to your autoloader isn't a problem.

I'm not arguing that if you have a very extensive functions library, you should separate it out. I totally agree that you should. But saying 'NEVER MAKE A FUNCTIONS FILE NEVER EVER EVER ON PAIN OF DEATH' is silly.

PHP Commandments 13 years ago

The point still stands, though, that you shouldn't put array_select_keys into a php file filled with other helper functions.

It doesn't stand. There's absolutely nothing wrong with having a file with simple helper functions.

  ArrayHelpers::array_select_keys();
is in no way better than
  array_select_keys();
There is plenty wrong with the helpers file you described at the end of your post. But it's because those functions break basic programming principles, not the fact that they happen to be simple functions in a file (and most of them are not even simple).
PHP Commandments 13 years ago

array_intersect_key does not do the same as array_select_keys. You can emulate it using array_intersect_key, but either in a more confusing or slow way.

  $array = ['a' => 1, 'b' => 2, 'c' => 3, 'd' => 4];

  array_select_keys($array, ['a', 'b']);
  array_intersect_key($array, ['a' => '', 'b' => '']); // OR
  array_intersect_key($array, array_flip(['a', 'b'])); // OR
Neither are elegant.

In either case, that wasn't the point. This is a basic kind of functionality that doesn't belong to any particular class in most code bases. So in this case, having a class of 'helper' functions like these isn't bad.

PHP Commandments 13 years ago

Maybe if it's used solely for debugging, but there are cases where simple functions aren't easy to place. Consider implementing the array_column function for pre-5.4 PHP. Or things like method pull, index grouping, or array_select_keys functions.

What helper library should a function like the following exist in?

  function array_select_keys(array $dict, array $keys)
  {
      $result = array();
      foreach ($keys as $key) {
          if (array_key_exists($key, $dict)) {
              $result[$key] = $dict[$key];
          }
      }
      return $result;
  }

@ the mobile data thing : data caps. I pay for 2 GB of data usage a month. I don't see anything wrong with my friend tossing me $15 and using 1 GB. If 50 people want to split it, I don't see a problem with it (though they probably will).

I hate articles like this. Not because they don't highlight what a steaming pile the actual fitness and training industry is, but because they're way too slow. Proper training articles have existed for a long time, in easily reachable spots. For all the stupidity at BodyBuilding.com, their forums biggest stickies are those about the 'Starting Strength' workouts - the ones where you deadlift, squat, and bench. T-Nation, another big one, has never advocated anything else for a starting athlete.

I just hate when someone posts something like this and goes 'Everything You Know Is A Lie!" No, it's not. I just happen to have read this shit eight years ago, and that was late already.

This is pretty freaking awesome. Having access to an easy patent search is huge for would-be inventors and probably quite a bit of startups. Removing the searching fees and making the data public is a great step towards fixing that fairly broken system.

Pretty awesome! Not something I'd be using in CSS, but certainly cool for an editor.

Time to see how it stacks up against some other Monos for code readability...

Definitely go to college. As much as it seems like that stupid piece of paper they call a degree is worthless and doesn't teach you anything, it shows more than that; it shows that you have the dedication to follow through with something difficult (difficult aka. boring as hell in the case of community college) and that you have some basic skills.

It's awesome that you already have a ton of experience under your belt, but no matter where you go, missing that degree is usually a red flag. Even if you end up as an entrepreneur, it will get you away from a lot of awkward questions. Not only that, but in taking some basic courses you might find that you have some other passions that were hidden before. Not to mention the hundreds of people you'll meet and make connections with.

Also remember that you might not have to go to a community college. Go to some prospective schools, talk to their admissions officers and teachers. Your three years in software development do mean something, and theres a chance you could get in to a school that would actually teach you a lot.

Talk to your partner and ask him what he coded it in, then start learning it. Also have a talk with him about management issues. It sounds like it's your project but it's not going according to an agreed-upon plan. Having a serious chat with him about it is probably a better place to start than just pulling the project from him.

F# is going to be tough, but take a look at the Netbeans / Eclipse IDEs. A bit easier to set up, especially if you're migrating from Windows to a graphical linux system like Ubuntu.

Vim and Emacs are great, but I would seriously consider a good IDE. The advantages of built-in project management is not to be underestimated. It's not something that's so ridiculously important later on, as you can obviously use something like git on its own to manage it, but initially it is fairly invaluable.

I totally understand this, and it's why I switched to a netbook.

But looking back, I realize that all these are really becoming non-issues. Two years ago, maybe - back when netbooks had (on average) 8-9" screens and were significantly lighter and more sustainable for long periods of time.

But nowadays - take a 13" Macbook Pro vs. my recommended Asus 1005PR EEEpc: 13" screen vs 10.1"; Significantly faster processor; 4GB RAM vs 2GB, supports 8GB, higher FSB; Larger keyboard.

What does it trade off? 6hrs vs 8hr of battery life, and it is 4.5lbs to the PR's 2.8lbs. Oh, and it's larger by about 3 inches.

Not even a contest. More screen space, better memory, a bigger keyboard, and comparable battery life is waaay more important than a few extra pounds. And while I understand the heat issues (which, really, depends on the model more than a specific type of laptop. Heat will be directly proportional to load and venting, so heat on one vs. the other will depend on the venting, because what you are developing will be the same), this is also starting to be less of an issue - I don't know what to say if you're putting something that generates heat on your lap during the summer. As far as weight - it won't be 6lbs difference, and even if it was, I would argue that this is worth it. With a proper laptop/messenger bag, this issue also goes away.

Edit: Oh, and yes, the Macbook does cost more. $700 more for these extra specs? Maybe not worth it...

But then again - craigslist one for $700 total, probably with a RAM upgrade. $400 for a good netbook vs $700 for a complete beast is an easy choice for me.

Definitely true - I do want to say, however, that newer netbooks will be able to handle all but the largest projects in Eclipse/Netbeans with ease, so this part is less of a consideration. Your main bottleneck will really be memory, which should still be adequate.

Agreed 100% here.

After a long time of using a Netbook for computing, I'm realizing soo much how the 'battery life and portability' is really not an issue.

Every year, more and more laptops come out that are lighter, faster, and just as cheap. And in all honesty, weight shouldn't be a deciding factor anyway - you can't operate the damn keyboard in mid-air, so you're going to be setting down your laptop a lot. If you're running a dedicated environment, you're also probably walking around with a backpack or messenger bag - my preference here, both for easier access and just plain looking cooler : )

But the issues of screen size and better keyboards are huge. Between the common need of many for running VNC and remote servers, and just the fact that an increase in pixels up to somewhere around 3000x1000 leads directly to increased productivity, the drawbacks of a 4-5 hour battery and an extra pound or two quickly fade away. Most people that are serious about the portability either bring a charger or an extended battery - I prefer the latter, since I often find myself in places without outlets or power strips (like the subway, or a conference auditorium ).

Think about it this way : What's the difference between a bag that contains the following:

3-lb "Workhorse" laptop; power cable; spare laptop battery; notebook; pens;

And one that has a 1-lb netbook?

Nothing.

Except for the fact that the netbook is slower and smaller, and only marginally cheaper.

As I write this, I begin to regret my own purchase :P

I'll echo most everyone else - a netbook, for development, is not an ideal choice. However, there are advantages - very portable, ridiculous battery life.

My main choice (and the one I ended up buying) was the Asus 1005PR : http://commercial.asus.com/product/detail/69

Here are the reasons: 1. Ultraportable. 10" screen means it fits anyway, and is light enough to carry around by hand. It's lightweight and comes with the standard EEEpc addons, making the boot-up time, especially to the mini-os, very good. This means quick note-taking and response if you think of something cool on the fly.

2. Absurd battery life - sometimes you don't want to drag around the power cable. Sure, 6 hours is enough for most people, but in honestly most other netbooks I've tried only hit 3-4 hours. I can easily crank out 6-7 in a single Starbucks dev session. This netbook will get you there, and the bus/train ride home.

3. Adequate screen size - Sure, it's 10", but its got a 1366x768 screen. Vertical space is an issue, but horizontal is very good - widescreen makes it pretty sexy for Ubuntu Unity (though I don't really like Unity). I will say that it 100% better than a 1024x600.

4. Fast - a Broadcom chip means you've got 720p on youtube with no hiccups. 2gb of ram with a decent Pinetrail processor. Not ridiculously fast, but with any netbook you're really not going to get more than 2Gb and a decent processor, but this does do the video part at least. Slap on a 64GB solid-state and you're flying.

5. Cheap? Really, all netbooks are cheap. This is towards the upper spectrum.

6. It fits the bill - it fits the specs you posted. It's not underpowered, and it's extremely portable and fast (bootup especially). Good for monitoring uptime/fixing quick bugs/ developing for long periods of time (with proper adjustments to your dev environment).

Hope this helps!

Just something I though of that might make your frontpage more interesting - emphasize the importance of uptime and the alerts system.

I think the main feature of this is the very quick alerts system for smaller-scale websites - obviously, for large projects with dozens of users per minute, you might need faster than 5-minute refresh. But I think that emphasizing the Instant Alerts, Free is one of the more important things here.

I think for most, the uptime amount itself is going to be a secondary measure - some other analytics software also does it for free on top of the standard log/click/visitor/path/etc. tracking.

Then again, maybe I'm nuts. but that's what I got out of it : )

Thinking again, I totally understand you plight. I've got the same problem on my netbook - having an easy-access calendar/time/mail indicator is much better than having to mouse over every time.

My current solution (well, technically future - I have to remove this stupid Unity off my netbook - it does me more harm than good) is to pull the taskbar to the bottom and hide it. Sure, no clock, which sucks, but I guess I usually have my phone around for that.

It beats the hell out of having the damn thing pop up whenever you want to open a new chrome tab, but it's not a perfect solution.

I think that Unity is going the way of the Apple philosophy - screw customization, because for the 99% of users it only leads to indecision and unhappiness. Make some basic adjustments available as 'apps', but leave the core functionality untouchable.

I wish I was a fan of that - sadly, I'm not. I understand the reasons behind it, and I totally support it. But I need something more - something that is customizable but intuitive, which is exactly why I chose Ubuntu in the first place. I hope it doesn't keep going in this direction.

I think the biggest problem with the current version of Unity is the lack of customization.

10.10 Unity does not allow the removal or movement of any of the desktop elements - you cannot hide the topbar or the sidebar, both of which take up significant space on netbooks. Less of an issue for desktop computing, but still.

The bars are also not customizable, which to me was a big draw of Ubuntu and the GNOME shell itself. Let's hope that they return that functionality - otherwise, I'll be using 10.04.1 for quite a while.

I wish I had a Mac. This is actually our main drawbacks - our company needs a somewhat unified system, which is why I'm asking for suggestions. Sadly, none of us have Macs, so while I'd love to use Coda (Seriously, I love that program. Using my friend Matt's Pro is simply a pleasure because of it) it's one of the programs I can't use.

Vim is, sadly, wholly inadequate for my needs. It kicks ass for speed, and I didn't know about the code completion, so that's a plus. But for integration with our current systems, it's just not enough.

Version control is much more difficult, and remote debugging is extremely useful to us. Quick project management is also more difficult with Vim, despite the rapid integration with the shell.

Don't know what kinds of blogs you are looking for, but my friends over at www.superprofundo.com write some pretty interesting stuff.