HNHacker News
TopNewBestAskShowJobs

k4st

148 karma · joined February 20, 2007

Present: C++ Developer at Hex-Rays SA. Formerly: Staff Engineer at Trail of Bits. Personal website: http://www.petergoodman.me GitHub profile: https://github.com/pgoodman
submissionscomments
k4st··on 10 Advanced PHP Tips To Improve Your Programming
None of those are particularly interesting or lead to better coding practices.

For example: dropping braces for block statements is a convention; it doesn't inherently make someone a better programmer. It's also not by any means 'advanced'.

Also, the else shortcut should be seen as having different syntactic meaning. Instead of emphasizing it as a convenient shortcut, it should be seen as a particular variable has a default state and belongs to the lexical scope that the if statement is contained within (even though PHP doesn't recognize block statements as new lexical scopes).

Finally, ereg_ functions should never be used. And favoring str_* over preg_* only makes sense when a non-trivial[1] regular expression is not involved. The suggestion is tantamount to saying use a function for it's intended purpose. str_* functions search using a string, preg_* search using regular expressions.

[1] By non-trivial I mean a pattern that involves more than a terminal. E.g. '~hello~' is a valid regular expression but is composed of a single terminal, 'hello' (or if you wan to see it as five terminals) but nothing else (e.g. repeating, conditions, etc.) and so '~hello~' is a case where preg_* functions are overkill.

k4st··on Sarah Lacy's counter argument to PG's 6.4% point
I'm confused. Are both 'affect' and 'effect' valid in the case of "... have a huge * on ...".

It seems as though 'affect' was misused there because the usage is also the definition and so she should have written: "greatly affects" or "has a huge effect".

k4st··on Ask HN: How do you meet a hacker to start a startup with if you are not in college?
I think that the light grey font coupled with the small amount of line spacing makes it difficult to read article bodies. Otherwise, I've registered and made my first post :)

As a side note, other than the lack of members, what makes your site stand apart from hacker news and proggit?

k4st··on Developing a better CMS
Can someone tell me what is ground breaking about their system?
k4st··on Why don’t hotels use Roombas?
... because a Roomba can only vacuum and do nothing else.
k4st··on Python isn't just Java without the compile
The example given in the articles entirely fails to describe functions as being first-class citizens. Python also lacks full continuations, unless the article is referring to Stackless Python. What is described in the article as continuations are actually generators. Finally, the meta-programming described in the article, while valid, really only scratches the surface of what's possible with meta classes in Python.
k4st··on My Startup: tracking real world trends - thoughts? suggestions?
One thing that seems problematic is having too many trends. How do you plan on motivating users to discover added but unknown trends on your website so that they might be able to see the light of day?
k4st··on Man, weather.com really sucks. I bet I could make a better one in a day.
That's why you need to use the weather network.
k4st··on Ask YC: What's the problem with eval()?
If you're worried about security when eval'ing js, check out: http://www.hedgerwow.com/360/dhtml/js_safe_eval/demo.php
k4st··on Quote a part of a web page as an image with an image map.
Sort of like browsershots, but taken to the next level. Took a while for the image to show up but once that happened it was quite cool. This seems particularly useful where you want to be able to quote images/diagrams from a page, tables, etc. In terms of text, it is not particularly useful unless the text provides a specific context for the images being "quoted". On the whole, very cool.

Otherwise, is the logo meant to look like a bbcode, ie: that capturing a screen shot is as easy as using bbcode? Or am I digging too deep into this?

← PreviousPage 4 of 4