Norris Numbers: adding code is great, until…

Uncategorized
Programmers get stuck at a certain amount of complexity. Newbies can write brute-force programs up to 2,000 lines or so, but beyond that it's too hard to manage. You can't keep everything in your brain. Experienced programmers have other tools -- abstraction -- to get up to 20,000 lines in a single project. There are other complexity walls: at 200K, then 2M. There might be a hard limit of any project at 3M lines: "the growth rate seems to slow down significantly no matter how many people (hundreds) or years are involved (decades). " Norris Numbers The author also clearly highlights the problem of Every Line is a Potential Bug -- go read!
Read More

Using multiple worktrees with git

Uncategorized
Modern development with Git is great. It's really easy to work on a feature branch, make changes, undo changes (oops), and share work with colleagues. However, there are challenges. If I'm running tests on my local "beer" branch, I can't easily switch over to the "gin" branch to edit code. The local environment only has one feature branch checked out at a time. I can run tests, or add code, or switch branches, but I can't do two things on two different branches at once... But now I can! Thanks to Manoj Mahalingam S, I know understand the "git worktrees" feature which lets you easily use multiple branches at the same time. Thanks, Manoj! Using multiple worktrees with git
Read More

class: Django QuerySets and Functional Programming #2

Uncategorized
The class last night at TrueCar was a lot of fun!  Lots of friendly people. Here the the slides, in web and raw Markdown format: Django QuerySets and Functional Programming #2 slides -- source Thanks so much to Chris at TrueCar for asking me to talk. Thanks to Chuck for the review, Goz for the feedback, and An-lon for the support. Thanks to all of you for coming out!  I look forward to the next talk. Here's the view from the office just off the Pacific Ocean(!) in Santa Monica: There was a good attendance: Not pictured: cute pug dog who snored at my presentation.  I like to have my participants feel comfortable ;)
Read More

Kanban Development Oversimplified

Uncategorized
I loved this article It's clearly written, with a brief descriptions of the large numbers of tradeoffs within the Agile ecosystem. Specifically, choosing a different size length of time to develop each feature makes a huge difference. I've been using very small, one-day timeboxes. The article notes that larger boxes, four weeks, can often help the client make meaningful, business-oriented decisions vs going over each bit of minutia.
Read More

(upcoming talk) Tricking out your Linux Kernel Networking

Uncategorized
teaser (1-2 sentences) The Linux kernel can be taught to perform amazing tricks. In this talk we’ll show cool stuff to do using nonstandard networking, interprocess communication, and  services like filesystems and network routing. --- Tired of normal TCP sockets? Linux can do so much more! ideas The kernel provides control and connection with external systems, kernel services, kernel itself, and other processes. Full knowledge allows application magic, like reconnecting streaming sockets to unconnected processes, or getting info from 3rd party systems by watching indirect effects. outline In the Wild-- Faint of Heart need Not Apply * Standard packages use tricks to achieve high performance and lots of features Nginx Apache Gunicorn uwsgi Socket/File similarities (-> Netlink) * Sockets and files are similar to the kernel; Netlink sockets give bulk…
Read More

Docker/Fig tip: easily watch cluster logs

Uncategorized
When using Fig to run a cluster of Docker containers, it's handy to have a console, and also a separate terminal with information so you can see what's going on.  That is, an interactive console, plus all the logs from all the containers. Use Fig to start your cluster, then interactively your containers as needed. As you modify stuff, the services emit logging messages, which you can see in the second terminal. here's the code for the second terminal. It uses Fig to get logs for all the containers.  When the config is changes and the cluster is restarted, this command loops again to reconnect and get all the new log messages. In this way you can just do you work and this terminal will always have the latest logs.…
Read More

extra Docker networking goodies

Uncategorized
I work a great deal with Docker, connecting webservers and databases together, hiding everything behind a caching proxy like Nginx.  Docker is a wonderful tool, providing isolation and semi-magical capabilities like hiding an entire "cluster" of machines behind a single container, a single process. However containers are not much fun. They're generally so stripped down as to make debugging issues rather more awkward than normal.  The following questions are common when something doesn't work: is my process running on the correct port? what processes are running? which services are up, on which ports? With a default Docker container, answers to these questions aren't obvious. Solution: add the following to all of your Dockerfiles: RUN apt-get update && apt-get install -y apt-file curl net-tools procps psmisc # 'psmisc' provides /bin/fuser; procps=>/bin/ps;…
Read More