5 Easy Ways to Improve Web Accessibility
These days it’s hard to conceive of life without the internet. We have come a long way since the early days of the internet as a hobbyist’s retreat full of text bulletin boards and personal “web logs”. People now rely on the internet to pay bills, shop for necessities and even earn an income. The world is at your fingertips… if you can use a mouse… and see the screen… and hear the audio.
Read More5 Steps to Clean Code
As a beginner developer working on pet projects at home, it’s easy to argue that once code goes through the compiler, it’s all the same. Right? The flaw in this argument is that it assumes that all software developers do is write new code. The reality is that we actually spend much more time reading and modifying existing code than writing new code.
Read MoreSwitching to ZSH
Jeff Atwood once famously proclaimed “we are typists first, programmers second”. While I think software development is a little more complicated than that, this quote brings up an important point: efficiency in software development hinges on the tooling we choose. For the longest time I used Bash as my UNIX shell. It got the job done. I would occasionally feel frustrated by a repetitive command or a missing feature, but there was usually an alias or script I could apply like a bandaid to minimize the pain enough to keep going. I even switched to iTerm several years back to improve my terminal emulator GUI. I worked with Bash for long enough that I managed to amass a pretty fancy .bash_profile config. If you’re curious about my config, you can check it out for yourself.
Read MoreYour Referer Is Showing
Did you know that every time you click through to a new webpage, you’re voluntarily telling that new webpage where you came from? This isn’t a trick by the NSA, its just the way the web works. As most people know, whenever you click a hyperlink, the browser sends a request to the resource on the other end of the link. What most people don’t realize is that by default the request contains the referrer field, which indicates the page where the user clicked the link.
Read MoreUnit Testing in Java Play
The Java Play framework is a Java development framework built on top of Akka that makes it easy to write scalable web services in either Java or Scala. It is fully RESTful and comes with a number of great features such as hot reloading, type safety and in-browser errors. If you are a Java developer who hasn’t yet tried Play, you are missing out on one of the best web frameworks ever developed for the language.
Read MoreDebugging "Unknown Provider" In Minified Angular.js
For the past few months I’ve been working on an AngularJS app that makes use of Angular Material as a Bootstrap-like front-end library. I recently had to solve one of the hardest bugs I’ve ever faced in Angular, and I’d like to share my debugging technique with anyone who might encounter the same problem down the road. While the bug was related to the use of Angular Material in my case, it could occur in vanilla Angular as well, so don’t stop reading just yet!
Read MoreJavaScript Promises With Node.js
JavaScript is a non-blocking programming language, which means that one chunk of JS code will not necessarily wait for the lines above it to execute before beginning itself. In many cases this is a pretty awesome feature of the language. Imagine if your website was only able to run one window.onload call at a time. If your page needed to perform a number of calculations or data insertions in order to render correctly, things would take forever to load and users would see a bunch of unstyled content and blank boxes at the beginning of every page load. Yuck.
Read MoreBeijing's Garage Cafe: An Ad-Hoc Startup Incubator
Peking University went on holiday last month in observance of Chinese New Year. As such, I knew I would be logging quite a few extra programming hours over the course of February. While I don’t mind working part-time from the comfort of my apartment’s bedroom, I actually kind of hate working from home full time. There are benefits of course: fewer interruptions, more comfortable and configurable workspace and no commute. Nevertheless, I start to go a little crazy when I spend over 16 hours a day in the same 10′ x 10′ space.
Read MoreBinary Bomb Lab :: Phase 6
A note to the reader: For explanation on how to set up the lab environment see the “Introduction” section of the post. If you’re looking for a specific phase: Here is Phase 1 Here is Phase 2 Here is Phase 3 Here is Phase 4 Here is Phase 5 Here is Phase 6 This phase is definitely the trickiest out of all of the other bomb lab phases. Prepare for data structures…
Read More