HN user

zingermc

286 karma
Posts0
Comments120
View on HN
No posts found.

Let me tell you folks. Writing spaghetti code with no separation of concerns and no version control is not exclusive to php

Yowza. If I can give you some unsolicited advice: get some kind of version control in place! Even if it's just a local git repo at first.

There were two things that made working in ColdFusion almost tolerable. (1) The place I worked started using an MVC framework before I left. I was pleasantly surprised by how much it improved the experience. (2) Transitioning to CFScript instead of CFML tags made a big difference as well.

But at the end of the day, it's still ColdFusion, and it drove me bonkers.

Hilariously, ColdFusion strikes again. I should have used pound signs around the bad_memories variable. The above code would dump the string "bad_memories".

Corrected:

<cfdump var="#bad_memories#"/>

Git is too hard 6 years ago

I've definitely been the victim of my own git hubris.

Once, when leaving a job, I decided to copy all of my local WIP branches to the server.

I whipped out this fancy --mirror option I had just heard of:

  git push --mirror $remote
Surprise! All branches on the remote repo got wiped. My local refs replaced the refs on the remote.

Somehow I found the right commits floating around in the git ether. I was able to recreate the branches, but I had to recreate their names by reading the commit log.

Did I mention this happened on my way out the door from a job? In retrospect, I shouldn't have panicked so much -- there were daily backups -- but the sheer terror I felt has made me read the man pages really closely to this day.

Keep in mind the adage "you get what you measure". If you optimize for CTR, you are not necessarily optimizing for user satisfaction/loyalty.

Case in point: Netflix's auto-play feature used to drive me bonkers, so much that I would try other streaming services first. How could they think this feature was a good idea? The only plausible explanation I've heard is that they were optimizing for user engagement. Users click around more to prevent the video from auto playing.

So, I should never drive?

The bad thing about it is I usually don't realize that I'm getting sleepy until after I've dozed off once.

I'm not trying to be rude, but this sounds reckless. You absolutely should not be driving while you have this issue. Also, consider that you may have a sleep disorder.

Your comment made me dig in a little more. I was wrong, it is only fetching the current tab, although it wouldn't need more permissions to see all the tabs.

In popup.js[1]:

    chrome.tabs.query({active:true,currentWindow:true}, function(tabs){ ... })
These `active` and `currentWindow` parameters to query() [2] restrict the results to the current tab. If I remove those parameters and run in DevTools, I seem to get a full tab listing.

[1] https://github.com/pinoceniccola/what-hn-says-webext/blob/ma...

[2] https://developer.chrome.com/extensions/tabs#method-query

I feel compelled to point out that this extension sends the URLs of all open tabs to algolia.com when you click the extension (at least on Chrome).

I would much prefer if it only looked up the current tab.

A more private design might fetch the top N results from algolia.com and only search through them locally.

That being said, this is cool! Thanks for sharing.

The beautiful part is that they may have no idea which IP address corresponds to your email until you click a unique link in the phishing email (or load a tracking pixel?).