Profile cover photo
Profile photo
Michael Haren
79 followers
79 followers
About
Michael's posts

Post has attachment

Post has attachment

Post has attachment

Post has attachment
Michael Haren commented on a post on Blogger.
How about some comma abuse to save two chars (down to 69 chars):

    for(i=1;i<101;i++)r=i%3?'':'fizz',r+=i%5?'':'buzz',!r||console.log(r)

I'm not sure how compatible that is, but it worked for me in Chrome.

Post has attachment
Michael Haren commented on a post on Blogger.
+1. I also added shortcuts for my address phone number, except I just use the street number and area code as the codes. This way I don't even have to remember to use them--whenever I start typing either one and hit <space>, the rest is filled in automatically

Post has attachment
Michael Haren commented on a post on Blogger.
Very nice work to keep your linkers happy!

Curious, though: are you essentially adding 19k+ routes? I'm not savvy with this stack so I could be reading it wrong. I wonder if you could use a little regex instead?

Something like this:

```
    server.get('^/(\d{4}(/\d{1,2}){0,2}/)?:slug/', frontend.single);
```

Loosely narrated, that goes:

^/
  start at the beginning of the url and match a slash
(\d{4}(/\d{1,2}){0,2}/)?
  a huge optional group, which looks for:
    four digits for a year, then 0, 1, or 2 groups of "/ and one or two digits" for the month/day
:slug/
  the actual part I'm guessing the route cares about

Just some thoughts pieced together from other areas in that server.js file and my love of regex--could be totally wrong :).

Oh- some rough tests: http://i.imgur.com/dqxgX5n.png

Post has shared content
"There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult." http://bit.ly/11YYUGV

Post has attachment
+Mark Carpenter and I built this meme thing. Check it out!

Post has attachment
Wait while more posts are being loaded