programming

Will Faught

July 2017

Survey Of Rounding Implementations In Go

Rounding in Go is hard to do correctly. That is, given a float64, truncate the fractional part (anything right of the decimal point), and add one to the truncated value if the fractional part was >= 0.5. This problem doesn’t come up often, but it does enough that as of this writing, the second hit on Google for golang round is a closed issue from the Go project, which declined to add a Round function to the math package.

go programming

Will Faught

1 minute

April 2017

JavaScript Doesn’t Need Class

Ian Elliot: JavaScript is the single most important programming language and yet, as it reaches its high point, everyone is complaining about it and there are significant efforts to replace it with something better - Go, Dart, Coffeescript. Even the people who love it seem to misunderstand it because they want to add “class”. JavaScript doesn’t need class! And if you think it does you need to look more carefully at JavaScript.

javascript programming

Will Faught

1 minute

JavaScript Garden

Ivo Wetzel: JavaScript Garden is a growing collection of documentation about the most quirky parts of the JavaScript programming language. It gives advice to avoid common mistakes and subtle bugs, as well as performance issues and bad practices, that non-expert JavaScript programmers may encounter on their endeavours into the depths of the language. Really good resource.

javascript programming

Will Faught

1 minute

The JavaScript Minefield

Jeff Walker: How is JavaScript a minefield? Well, JavaScript has all sorts of pitfalls lurking for the developer. Each pitfall is like a mine in the minefield, silently waiting for you to accidentally step on it. Just like the minefield, JavaScript’s mines are hidden in plain sight. Entire books have been written about all the mines present in JavaScript. Maybe I’ll get into what some of those are in future blog posts.

go javascript programming

Will Faught

1 minute

Vim Koans

The novice finished aligning two beams and had positioned a nail ready for beating into the wood, but found the hammer was out of reach. “Would you pass me the hammer, master?” Master Wq handed the novice a saw. At once, the novice was enlightened. So good.

programming vim

Will Faught

1 minute

Git Koans

“Master,” said the novice, “what is the nature of long and short options for commands? I thought they were equivalent, but when that developer used -h you said something different than when I said –help.” “Perspective is everything,” answered the Master. The novice was puzzled. She decided to experiment and said “git -h branch”. Master Git turned and threw himself off the railing, falling to his death on the rocks below.

git programming

Will Faught

1 minute

March 2017

Why I Left Language 1 For Language 2

Igor Horst: I am a big fan of [Language_1] and one of its early adopters, having been disappointed with the utter failures of [Language_0]. I have been an avid contributor to many open source projects such as [Obscure_Project_1], [Obscure_Project_2], and [Obscure_Project_3]. However, after using [Langauge_1] for over 5 years, I have been dealing with [Minor_Technical_Flaws]. At first, I ignored and even tolerated these flaws, but ultimately, I was forced to confront reality.

programming

Will Faught

1 minute

December 2016

The Default GOPATH

The requirement of setting a GOPATH has been a major issue for Go users who installed the Go tools for the first time and got the “you have to set a GOPATH” error in their initial experience with the tools. Explaining the GOPATH is and instructing how to set this env variable were both distracting new users away from using Go. This was especially true for users who are not necessarily developing in Go but using go get to download commands.

go programming

Will Faught

1 minute

Why Does Calloc Exist?

Nathaniel J. Smith on the purpose of calloc: When the operating system hands out memory to a process, it always zeros it out first, because otherwise our process would be able to peek at whatever detritus was left in that memory by the last process to use it, which might include, like, crypto keys, or embarrassing fanfiction. So that’s the first way that calloc cheats: when you call malloc to allocate a large buffer, then probably the memory will come from the operating system and already be zeroed, so there’s no need to call memset.

c calloc programming

Will Faught

1 minute

September 2016

SQL Injection Can Compromise The OS

TIL that if your server has even one SQL injection vulnerability, the entire operating system can be compromised. Eye-opening!

code coding engineering hacking programming software sql

Will Faught

1 minute

August 2016

Go Raised The Bar

Go raised the bar for new language distributions: UTF-8 code Testing, benchmarking, and profiling built in Single command line tool Build tool that leaves code directories clean Package manager Package doc browser Standard code style and formatter Fast builds Language spec with grammar and thorough library documentation Uniform, batteries-included standard library Concurrency support and automatic parallelism, sync and atomic libs, race detector Interfaces, not inheritance Vendoring support Cross compilation Static linking only for simple deployments Tabs, not spaces No semicolon line terminators Trailing commas in lists to minimize diffs Static types Default values for uninitialized variables Built-in comparisons and hashing Safety (e.

code coding engineer engineering go program programming raise the bar software swift technology

Will Faught

1 minute

FizzBuzzEnterpriseEdition

FizzBuzz Enterprise Edition is a no-nonsense implementation of FizzBuzz made by serious businessmen for serious business purposes. So funny.

coding enterprise funny java programming satire

Will Faught

1 minute

Why Some Diversity Thinkers Aren’t Buying Tech Industry’s ‘Pipeline’ Excuses

“Diversity thinkers”? Who comes up with that terminology? The pipeline is a valid argument because that’s exactly what’s happening. Anyone who disagrees ought to first take a look in the mirror: have you ever bought your kid a gender-specific toy? A doll for a girl? An action figure for a boy? Because if so, that’s the problem right there. The problem is you. The problem is social. The problem is parents holding their girls back by only giving them “girly” things.

coding computation computer science computers computing feminism npr planet money programming tech technology

Will Faught

1 minute

July 2016

Aphyr Tests Redis With Jepsen

Aphyr on Redis correctness: So you’re running a distributed Redis install, and have realized that the design of Redis Sentinel (or, for that matter, any other failover system on top of an asynchronously replicated primary-secondary design) means you can lose a lot of data when a partition occurs. What can you do? From an operations perspective, I recommend you try to understand the Sentinel consensus algorithm. I don’t, and I’ve read it a dozen times.

aphyr coding database jepsen programming redis

Will Faught

1 minute

Check Sudoku Solutions

My Golang program to check whether Sudoku solutions are correct. It works for any valid Sudoku board size (1x1, 2x2, 4x4, 9x9, 16x16, etc.)

coding engineering go programming software software engineering sudoku

Will Faught

1 minute

June 2016

Io Language

Io looks like a nifty language.

coding io language programming software

Will Faught

1 minute

Long Names Are Long

Bob Nystrom: What I want to talk about is something I see in a lot of code that drives me up the wall: identifiers that are too damn long. Yes, names can be too short. Back when C only required external identifiers to be unique up to the first six characters; auto-complete hadn’t been invented; and every keypress had to be made uphill, in the snow, both ways; it was a problem.

naming programming variables

Will Faught

1 minute

April 2016

Frighteningly Ambitious Programming Language Ideas

Jon Purdy: Furthermore, 1D languages require jumps for flow control, but since any graph can be embedded in three dimensions, languages of three or more dimensions can be written jump-free. An easy way to do this is to allow changing the direction of the instruction pointer rather than its position. Blew my mind.

future ideas instruction languages pointer programming

Will Faught

1 minute

Programming Language Naming Patterns

On the classification of programming language names: Artificially shortened names: Scheme (from “Schemer”, following on from “Planner” and “Conniver”; shortened to fit in 6 characters because ofa limitation of the ITS operating system) Perl (from “Pearl”, the precious stone; shortened to avoid a clash with “some obscure graphics language called Pearl”) Forth (from “Fourth”, because its creator considered Forth a “fourth-generation language”; shortened to fit into 5 characters because of a limitation on the IBM 1130) The origins of some programming language names are fascinating.

forth names perl programming scheme

Will Faught

1 minute

What’s Awful About Being A Software Engineer IC, Tech Lead & Manager

Brett Slatner on the trials and tribulations of being a software engineering individual contributor, tech lead, and manager: I’ve been building software professionally for over 10 years now. I love what I do and I hope to be an old programmer someday. But along the way, I’ve encountered many terrible things that have made me hate my job. I wish that someone had given me a roadmap of what to expect earlier in my career, so when some new and unfortunate awfulness occurred that I wouldn’t have felt so alone and frustrated.

management programming

Will Faught

1 minute

March 2016

Programming Etiquette

Don’t name your count variables cnt for obvious reasons.

cnt programming

Will Faught

1 minute

Bootstrap

Just automated bootstrapping my OS X programming environment. It sets up: Homebrew Homebrew cask Homebrew and cask packages Oh My Zsh Maximum Awesome That takes care of my terminal, shell, programs, and configurations.

bootstrap homebrew programming zsh

Will Faught

1 minute

Fixing The Inequity Of Startup Equity

Stock options are valuable compensation for startup employees. The high potential upside of these options motivates employees to turn down larger salaries at bigger companies and work at startups. It seems obvious, then, to expect that employees should own their vested options outright, even if they leave the company. Stock options are compensation for work that’s already been done. Returning them to the company when you leave would be inequitable.

engineers equity programming startups stock

Will Faught

1 minute

January 2016

Backdooring Your JavaScript Using Minifier Bugs

An interesting idea of exploiting bugs in code minifiers, inspired from compiler exploits.

javascript minifiers programming

Will Faught

1 minute

Using The Syntax Tree In Go

A very nice tutorial for transforming Golang ASTs by Tim Clark.

ast go programming

Will Faught

1 minute

The Legacy Of Go

Dave Cheney: In my mind, of all the possible candidates that Go has removed, it is the removal of threads that will be its most profound contribution. This is not to say that Go programs do not use threads, any more than you can say structured programs are not compiled into branch and jump instructions. But Go programmers no longer have to concern themselves with thread management, or as Uncle Bob would say, Go programmers are restricted from directly controlling the thread their code runs on.

go programming

Will Faught

1 minute

November 2015

“Why Go Is Not Good”

Will Yager on Golang: I like Go. I use it for a number of things (including this blog, at the time of writing). Go is useful. With that said, Go is not a good language. It’s not bad; it’s just not good. We have to be careful using languages that aren’t good, because if we’re not careful, we might end up stuck using them for the next 20 years. This is a list of my chief complaints about Go.

go programming

Will Faught

1 minute

February 2008

Rasmus Lerdorf Comes To Town

Rasmus Lerdorf, the inventor of the programming language PHP, came to Cal Poly yesterday to give a two-hour lecture on PHP and related web technologies. I didn’t know anything about him, but I was pleased to find he’s a very intelligent, pragmatic, and humorous person. He spoke at length about the transition of PHP into an open source project, the evolution of the language, and some security and performance topics that I found very interesting.

cal poly javascript languages life php programming rasmus lerdorf reflections web yahoo yui

Will Faught

1 minute

October 2007

Expressiveness In Human Languages

Programming languages vary across a spectrum of expressiveness. By expressiveness, I mean the ability and ease by which you can express something in a particular language. For example, programming languages having closures are widely considered to be more expressive, and hence more powerful, than languages that lack this feature. I wonder if natural (human) languages also vary in expressive power and if so how this affects your thinking and personality. If you grew up learning the most expressive natural language of all, would that make you smarter than those who didn’t?

expressiveness human ideas languages life predispositions programming

Will Faught

1 minute

π