dtreacy
Re:Show HN: A simple url shortener written in Node
on Wednesday September 21, 2011 @05:12AM (#3021297)
If you're able to input invalid URL's I guess I didn't test the regex thoroughly enough ;)
I'll look into it.
The prepending "http" is just a lazy hack to handle the case where they enter "google.com" instead of "http://www.google.com, which would fail the regex, but is a valid URL. This would be deprecated by improving the regex validation.
Keep in mind I threw this together in an afternoon.... But thanks for the critique ;)
Re:Show HN: A simple url shortener written in Node
on Wednesday September 21, 2011 @05:07AM (#3021289)
Good point. Yes, in theory they could be duplicated. I chose 6 characters firstly to keep the url as short as possible (I thought 5 chars was too short, 7 too long).
I am planning on introducing a background process to clean up shortened URL's that haven't been accessed in a given time frame (still deciding but I think around 7 days). While it still wouldn't solve the problem you mentioned at a certain scale, it would help. But true, I very much doubt it will ever reach that scale.
Thanks for the critique
Show HN: A simple url shortener written in Node
http://www.github.com/danieltreacy/naurls
Was bored at work so I threw this together. First bash at a Node app. Built a simple Chrome extension for it too.
Re:Goodbye, shitty "Car extends Vehicle" object-orientation tutorial
on Wednesday August 24, 2011 @12:28AM (#2919452)
"Duck extends Bird" is not the wrong thing at all. As other comments have pointed out, the justifications in the article don't apply to someone who is just starting out learning the basics of OO.
Re:Goodbye, shitty "Car extends Vehicle" object-orientation tutorial
on Tuesday August 23, 2011 @02:47AM (#2915640)
THAT'S WHY ITS A BEGINNER TUTORIAL. Get off your high horse.
Why I get aneurysms from tech media and incubators
Re:I don't program in my spare time. Does that make me a bad developer?
on Friday June 17, 2011 @12:59AM (#2664384)
No. Just means you write more code. If you spend that time learning different languages and design patterns, it can make you a better developer.