Hugo For The Semi Literate Techie

I am a semi-literate techie. I deal with hardware in my day job and software is a hobby on the side. So while I can hack code and generally come up with a solution to my problem, I can’t whip up a site like Gmail or Stackoverflow over a weekend.

I originally started on Blogger and decided to try Hugo after I had concerns about Google’s long term plans for Blogger. We have seen with sites like Picasaweb and Google Reader that Google has a tendency to close sites that are not updated often.

I chose Hugo over its many other static blog competitors because it has a very simple setup – it is a single native executable that runs on all the major OS’es without dependencies. There is no need for gems, rakes, Ruby, or any external software.

I chose a static blog because I want to simplify hosting. I do not want a server that requires securing and patching, a database I have to maintain, or dealing with upgrades. I want portability in case I have to switch to a different webhost or different blog engine.

I host my Hugo site on Amazon S3 and push it through CloudFront for about $1/month. Cloudflare is another good free option. With CloudFront, the site is replicated all over the world and will scale rapidly if I experience a blowout. Also I don’t have to deal with maintenance or censorship. If Amazon objects to my content or disappears then I’ll simply move it to another web host.

Some of the startup pains I, the semi-literate techie, have encountered:

  • Many of the themes seem to be broken.
    • For example, themes like (Bootstrap, Tachyon) only recognize a directory called ‘post’. Logically a directory with many posts should be called ‘posts’ but this has escaped the theme writers.

    • I tried the Tachyons theme but it gave me an error message when I created a new post. If I was a Go literate programmer I’d figure out a fix and submit a patch to github, but I am not a programmer and a theme that breaks when you do something basic like create a new post really shouldn’t be a so-called featured theme.

    • Themes do not appear to be inter-operable. I started with Bootstrap and got error messages when I changed the theme in my config.toml. Again, I really don’t want to debug error messages when publishing to my blog.

  • Hugo is very particular about its base path. I couldn’t simply put hub.nexms.com but had to use http://hub.nexms.com. Seriously, does it think I’ll be serving this site over gopher://?

  • Hugo uses a non-standard markdown processor. Instead of using GitHub markdown or CommonMark, it uses a library called BlackFriday. This means we have to deal with idiosyncrasies unique to this parser – for example, tables are formatted differently on BlackFriday than on GitHub. Table support in Markdown is universally bad. I eventually gave up and coded my tables by hand in HTML.

  • The themes or Hugo are not optimized for speed. Using the Google PageSpeed Insights tool shows:

    • The JS and HTML content could be minified to reduce download time
    • The CSS could be inlined for faster loading

There is no easy Markdown convert and view flow. This means I have to run my markdown file through Hugo and open it in a web browser to see my changes.

I use stackedit for my Markdown editing. Stackedit runs in the browser, shows my Markdown and final view side-by-side, and syncs my files to Google Docs. This makes it cross-platform and usable on all my computers. I still have an annoying flow where I have to copy the Markdown into a text file with Hugo headers before publishing.

To sync my files to S3, I use Jets3t. Jets3t is cross-platform and comes with a highly configurable utility called synchronize which lets me automate the upload. The best part is that I can enable SHA256 encryption with a single line. Now my files are encrypted while in storage at S3 and only decrypted when sent to the browser.

Advertisements

Selling Out To The Man: Amazon Reviews For Free Products

From time to time I get emails from Amazon sellers offering to send me some product to try out for a “review” and then afterwards, keep it with their compliments. Essentially the seller giving me the product is payment for the review. Amazon doesn’t allow sellers to compensate users with money for reviewing their product so the product is the compensation. Implied but not mentioned is that product is payola for a positive review.

I usually ignore the emails, but I got one a few days ago and I decided to reply just to see would happen. The seller was very prompt. They immediately wrote back requesting my address and asking me to verify my email address. I suspect they mass-mailed users on Amazon and the email verification was to get the actual address.

I forgot about it for a couple days and was surprised when a package showed up in my mailbox. I didn’t know what it was and vaguely linked it to the email conversation I’d had with the seller. The seller was on top of things and had already sent me a reminder message since tracking showed his package had been delivered!

In addition to a regular text review, I also did a video review because I felt thankful for getting something for free. It took me about an hour to do it and I felt it was a fair exchange for an approximately $15 item. My thoughts and writing of the product was completely honest so I didn’t feel disingenuous about the review. I think that if I didn’t like the product then I would have politely declined and returned it. Besides, I’m no influence wielder on Amazon and doubt my words are that persuasive.

I’d love to “review” more products. In addition to this wonderful blog and an Amazon account, I also have a slightly not popular Youtube channel and am fairly technical for technically oriented products and teardowns.

Why Is Adafruit So Damn Expensive

Adafruit is an online store synonymous with the word maker. They sell electronic parts and kits to make gadgets that in most cases you can buy fully built. For example their MintyBoost is a $20 AA to USB charger you make yourself and it doesn’t work on all phones. For $5, You can buy an already-assembled similar gadget on Ebay (screenshot).

Another example is this $10 WiFi adapter designed to work with Linux systems like the Raspberry Pi and the BeagleBone Black. A quick search on Ebay for the chipset, 8188CUS, shows one for about $3 including shipping. With Adafruit you pay extra for shipping which starts at around $5.

I understand that Adafruit has to make a profit and, unlike most Ebay sellers, has fast shipping with easy returns and exchanges. However, that doesn’t justify 3x – 4x markups. If an Ebay item does not work as advertised then I’d simply order another one, it is very unlikely I’d get 3 or 4 bad ones in a row. Plus the threat of a PayPal charge-back coupled a bad review and subsequent loss in sales keeps most Ebay sellers honest.

So how can the frugal semi-literate techie work around these incredibly high markups?

Look on Ebay. Find the actual part number and search for it on Ebay. You’ll be surprised at what you find. Ebay sellers often include shipping and sometimes throw in extras. For example right now Adafruit has the Raspberry Pi 2 for $40. The Ebay seller loverpi has the Pi 2 for **$38 **(screenshot), with two heatsinks for overclocking, a two year warranty, and includes shipping.

Make your own. Judicious reverse engineering often reveals what is on an Adafruit board and it helps that they open-source many of their designs. Building them is somewhat tricky – many of Adafruit’s PCBs can be replicated on a prototype board. For PCB designs under 10x10cm you can easily get 10 PCBs through DirtyPcbs at $15 for 5x5cm or $25 for 10x10cm.

Find alternatives. Adafruit has some neat stuff. For example this potentiometer with a big knob is nice. But, Ebay seller cell.expert has 10 potentiometers for $1 with free shipping (screenshot). You could have a 90% fail rate and still come out ahead. For that price I’ll get a tiny screwdriver set from the dollar store to turn that screw!

AAA goes from service to up-selling

Just a few days ago I returned from a short trip to find my car battery dead. Instead of getting out my jumper cables, I decided to call AAA with whom I have a Plus membership.

Calling them to request a jump-start was simple and they quickly dispatched a tow truck. I’ve been a member since 2002 but have rarely had to call them. So I was pleasantly surprised when they followed up with a text message with a link to a map which showed the location of the AAA truck in real-time. They even have an app I can use to request assistance without calling.

Once the tow-truck driver arrived he quickly jump-started my car and at this point I expected him to give me some advice about being careful and then leaving. However he started taking pictures of my battery. I asked him why he was taking pictures and, instead of responding, he put on a smirk and ignored me.

I’m surprised that AAA has removed being polite from their training. He then hooked up a device to my car which I later found out was a B2QTech Battery Tester. He took some measurements and came around to me and told me that my battery was on the verge of dying and that I should buy a battery he just happened to have in his truck.

I declined his offer knowing that AAA would overcharge me for a $40 battery and the 10 minutes of labor it would take to replace the battery. As a parting gift the technician emailed me a [B2QTech Battery Test Report (http://content.nexms.com/b2qtech_b1_battery_report.pdf). The so-called “report” looks completely bogus considering the battery was dead just a few minutes ago. Of course the battery is going to be under charged and in “poor health” right when it has been dead for a while.

I’m really surprised that AAA now trains its drivers to up-sell the customer and treat them with rudeness. I’ve kept my AAA membership for more than 14 years because they’ve taken care of me in the past and given me peace of mind knowing they’d take care of me if I got stuck. There are now many alternatives out there and it is in our best interest to keep them in mind.

A Cheap Standing Desk For Small Spaces

I used to live in a small space and didn’t have the space for a desk as well as a chair. While walking around at Ikea one day, I noticed they have a very versatile shelving system called IVAR. IVAR comes in two sizes, about 35×20 inches or 19×12 inches, and in a variety of heights.

I decided to try out the smaller one, the 19×12 inch version, for a standing desk. I found they are good for storage, but also make excellent standing desks.  Besides the sizes, you can also choose how many shelves you want. I got a 5-shelf version for about $70, similar to the one Ikea shows on their page here. For stability I opted for two X-supports instead of the recommended single X-support. The shelves are adjustable in about 1/2 inch increments so you can easily set them up to match your height and arm length.

I put my monitor on the top shelf and keyboard and mouse on a second shelf adjusted for my arm height. my laptop and power strip go on the fourth shelf. With all that, I still have two more shelves for storage or additional computer peripherals. I put a Novaform memory foam mat on the floor to help with fatigue.

There are a couple drawbacks though. It is hard to see the keyboard since it is hidden by the shelf supporting the monitor. But that isn’t a big problem if you are a touch typist and only need to look at the keyboard occasionally. The small shelf isn’t wide enough for a full size keyboard and a mouse. Luckily I have a 10-keyless Deck Keyboard. You can also get by with putting the mouse on the top shelf with the monitor.
Removing the shelves takes a lot of force and one of the shelves developed a crack during dis-assembly for my last move. I don’t think the IVAR shelves can take a lot of moving around. The shelf, typical of Ikea quality, is stable for vertical forces but, despite the X-supports, a wobbly when pushed forward or backwards.

One assembly ‘hack’ is to flip the legs over so the big gap is at the top, basically to do the opposite of what Ikea shows on this page.  This way you have more room under your monitor for adjustment.

Overall it is a decent deal for $70 considering regular stand-up desks can cost $200 and up, require much more space, and don’t have as many storage options.

A picture of my setup

IKEA IVAR stand-up desk shelf

Watson EN-EL14A Lithium Ion Battery Pack Review and Pictures

I’ve recently become interested in photography. I have a Nikon D5100 and while I can take several hundred pictures by themselves, using the screen and taking video tends to drain the battery. Since I only have the one battery my Nikon D5100 came with, I decided to get a second battery for extended photo sessions.

Looking at the B and H Photo website, I had the option of purchasing an OEM Nikon EN-EL14A battery for $42 or a generic “Watson” brand battery for $30. The reviews for the Watson battery were mostly positive. Both batteries had free shipping so the choice was clear – I picked the Watson battery and saved the $12 for future shopping.

The battery shipped and arrived surprisingly fast. I ordered it on a Thursday and it was at my house on the following Monday. I opened the package and plugged the Watson battery into the OEM Nikon charger that came with my camera. It charged fine. Nikon is known to puts chips in their batteries to keep out competitors but this battery worked in my D5100. I was able to take pictures and change settings right away. The Watson weights about the same as the OEM Nikon battery but I expect it to last a little longer between charges because it is rated for 1150mAh vs the 1030mAh the EN-EL14 (no A at the end) that came with my camera.

I will update this page if the battery doesn’t live up to expectations. For now the battery functions the same and lasts as long as my OEM Nikon battery.

Pictures

Front
Front of Watson EN EL-EL14A Battery in Package

Back
Back of Watson EN EL-EL14A Battery in Package

So You Want To Be An Electrical Engineer …

In my spare time, when I’m not working on this site, I work as an Electrical Engineer at a somewhat major semiconductor manufacturer. I’ve been at the company for 12 years – ever since I graduated from college. For those heading to or in college contemplating Electrical Engineering as a career, I suggest looking for an alternate career path. If you have the aptitude to succeed in engineering then you most certainly will make as a doctor. If you get a bachelors degree in engineering then Finance or Law are good options.

Things to consider:

The hours are long and unrelenting. I’m usually at work at 7:30AM, leave at 6:30PM, and can count on working through lunch once or twice a week.
Weekend work is frequent and we often work over major holidays because the FAB will get their product out before the holiday so they can take time off. So we end up debugging over the holiday to meet customer commits.
Companies promote “work-life balance”. Mention this if you don’t want to work over a holiday or need to go home early and you’ll be marked down as a complainer.

Job security is non-existent. Despite our loyalty to the company, we’re on the chopping line every time there is a downturn or even a hint of a downturn. They say the employment is “at-will” meaning they can fire us at anytime but we can also quit at any time. However the balance of power is asymmetric – we rely on work for health insurance and literally the food we eat. But to the company we are replaceable commodities.

You are always competing against your peers. Companies use stack ranking to grade employees on a bell curve. Even so called “successful” employees are rated on levels of “goodness”.
This forces you to compete against your co-workers. Why share knowledge or help someone when you can do the work yourself and claim the credit? Or wait until there is a crisis and then swoop in to save the day?
Despite claims that only bottom performers are fired, recently we had a mass layoff where all “good” employees that had been on the lower end of good for the last two years were laid off. The reasoning was that even though the employees were rated “good”, they did not try harder to improve.
Of course the corporation did not take personal circumstances into account – one had been ranked low because he was taking care of a sick wife, another had been put on a low priority project by his manager, and another was dealing with kidney failure which leads me to my next point ..

If you get sick then you’ll be forced out. In the United States, the Family Medical Leave Act or FMLA allows a person to take up to a year of unpaid leave if they get sick or have to take care of a sick relative. If you are away from work then of course you’ll be ranked lower than your co-workers because obviously they are working and you are not. Guess what? You are now a target to be laid off for low performance!

There is rampant age discrimination. You may be young now but someday you’ll be old. The tech industry does not want older people because they tend to be slower and expect to work reasonable hours. Why pay an older worker when you can pay a new graduate a little less and have them work more? Doctors and lawyers on the other hand, gain more respect as they age and are revered for their experience.

It may sound like I’m complaining. I’m not. I feel like I’m paid well for my work but it is a tough industry without good prospects as you get older. The best thing to do is to work hard, save your money, and work on a side business you can grow into a full time job when you age out of engineering.