Quantcast
Channel: Posts on A Foo walks into a Bar... - blog by Paul Shved - coldattic.info
Browsing latest articles
Browse All 113 View Live

Optimizing Massive Data Views in Ruby on Rails

Ruby on Rails is a web application development framework most known for its flexibility and heavy use of metaprogramming. Rails programs, as one of my peers described, "look like they explain what to...

View Article



Ruby on Rails Errors and Solutions

When you develop something in Ruby on Rails, you will most likely encounter strange errors here and there. These errors may look like language or framework bugs, but they are not. Most likely, they are...

View Article

Counting Visits Efficiently with "Wide Caching"

One of the features of the web forum engine, a clone of which I develop in Ruby on Rails, is that it displays some site usage statistics. There are two kins of statistics it displays. First, it tracks...

View Article

Logging in Expressive Languages

I am not aware of any strict mathematical definition of expressiveness of a language. Informally, a language is more expressive if it allows you to achieve the same with less keystrokes. From this...

View Article

BLAST at the Competition on Software Verification'12

At my previous job in a research laboratory, I was improving a Static Analysis tool named BLAST. The name abbreviates its origin, and is decomposed as "Berkeley Lazy Automation Software Verification...

View Article


A Different View on the Strategy Pattern

If you read a short description of a patern in a usual pattern book or in a Wikipedia article, you will most likely not realize its full power. A true realization comes when you derive the pattern from...

View Article

Time-Based Protests

Sample time-based Protest (photo by Ivan Afanasiev). The largest "Strategy 31" time-based protest I attended (January 2011). A protester features a sign with a protest logo. A month ago I bumped into a...

View Article

How Static Verification Tools Analyze Programs

One of my previous posts featured a plaque we got for scoring an achievement in the Competition on Software Verification'12. I promised to tell how the tool we improved analyzed programs to find bugs...

View Article


A Tie for a Python Programmer

A couple of weeks ago I started a new project in ROSA. The project is a dynamic system that tracks health of our Linux distribution repository in real-time by watching the builds and repository status,...

View Article


A Dying Tux on an Airbus

So I am on a trans-Atlantic flight onboard an Airbus A330. It is a pretty large plane; each seat is accompanied with a computer referred to as "the Entertainment System" (big deal at the time). The...

View Article

How to Watch HDTV from Internet on your TV with Linux PC (Legally)

Hooray! The Airbus finally brought me to the land where law is taken slightly more seriously than in Russia. With great responsibility, however, usually comes great power, and a lot of absolutely legal...

View Article

Consistency Models Explained Briefly

Wikipedia used to do a pretty bad job at explaining the theoretical foundations behing the different consistency models of multithreaded/distributed systems. Especially cryptic was the definition of...

View Article

The Fallacy of Simple User Interfaces

A half a year ago, I've been challenged with improving functionality of a piece of software without making its interface more bloated than it already is. That made me thinking about the complexity of...

View Article


Not So Static

"Forget these silly runtime errors you had in Ruby: C++ is statically-typed!" Levap, a seasoned engineer, was enlightening the new hire. "You no longer have to wait while the sample run or unit tests...

View Article

How to Select a Place to Live via Google Maps

This post is not about programming at all, but just about solving old problems with new computing tools. The old problem is finding the neighbourhood to rent the apartment in, and the tool is a map....

View Article


Why I No Longer Work On Weekends

I remember this picture of my typical day two years ago. As sunny Russian winter morning finally banishes the dull winter night, I finally say "bye" to my girlfriend and leave for historical part of...

View Article

Zeno's Flat Screen TV Paradox

If I was to explain Zeno's paradoxes to a layperson, I'd start with the Zeno's Flat Screen TV Paradox. It is very practical: most have firsthand experience in real-life application of this deeply...

View Article


The Pipe-Pipe-Equals

It is hard to come up with a google-friendly name for the ||= construct you see in some programming languages quite often, "pipe-pipe-equals" being the is the closest (other names include "double-pipe...

View Article

How to Get Binary Search Right

As you already know, binary search is an O(log N) way to search if a particular value exists in a sorted array. There are some reports on how "most of our implementation" of binary searches are broken....

View Article

A Mutex Puzzle

I wrote earlier that I know very few decent programming puzzles. To be more precise, I know one, The Prisoners Riddle. So I was reading that The Art of Multiprocessor Programming book (I already made a...

View Article

Multithreaded Consensus Versus Practice

Many programmers complain that most of what they've learned in their universities is completely useless in their daily work. Anecdotal evidence, a survey among some MIPT alumni, suggests that the...

View Article


SF Muni LED Sign at Home with Raspberry Pi

Running like this My Android phone's stock alarm clock wakes me up into a cold summer San Francisco morning. I wallow around a bit, but eventually get up to enjoy yet another day. An hour later, I'm...

View Article


Misuse of Caching in Web Applications

I noticed a pattern in some of my web software architecture failures, and I also notice similar pattern in others' designs. In many cases, people simply misuse memcache, hurting performance of their...

View Article

Light Sensor with Arduino for the Muni Sign

"SF Muni Sign at Home" series Several post on how I was building a San Francisco Muni sign that shows train arrival times at home. SF Muni LED Sign at Home with Raspberry Pi — first post where I...

View Article

Nonlinear Effects when Web Server is at 100% CPU

I used to wonder what this Error 502 meant when I observed when I visited my favorite websites. When I retried the error usually seemed to disappear, and I found it's linked with the service being...

View Article


How Reader Mutexes Can Deadlock

Sample Deadlock Translucent areas depict waiting for something; incomplete lock statements have dashed border. Note that it doesn't matter in which order the top two acquisitions are made. Can a...

View Article

Division by Zero? How About Multiplication by Zero

Crash due to division by zero? How about multiplication by zero? I recently transferred to the next level of floating point arithmetic caveats. Division by zero is something we all know about, but...

View Article

A New Look

This website just got a new look (with mobile layout), a new web hosting, and a new technology that powers it. I’ll post the summary in the coming days. And otherwise, just enjoy fewer lags and 500...

View Article

A Farewell to Gentoo

As I mentioned in my previous post, the previous version of this blog ran on a VM powered by Gentoo Linux. Partly, that was the reason it was such a big mess and frankly, a security hazard. You see,...

View Article



This blog is now a Hugo-powered static website on AWS Elastic Beanstalk

Ten years ago, I thought this website should be a content platform with video hosting, blog platform, and other cool things. It was an essential learning experience: I’ve chased performance bugs and...

View Article

Containers on Amazon made easy: AWS Elastic Beanstalk Speed Run

In the previos post, I described why I chose Amazon AWS elastic Beanstalk for this blog. AWS Elastic Beanstalk (EBS) is the way to deploy Docker containers on the autoscaled Amazon Cloud with zero...

View Article

Take Apart that Giant Case: A Compact, 1.5kg Thunderbolt3 eGPU Setup

A Thunderbolt 3 external GPU setup that doesn't weigh 7 pounds (3kg)? Is it even possible? Of course it is, but you'll need to do some simple tinkering. This post describes how you can do it in a...

View Article

I tricked the Amazon Go store

I tricked the Amazon Go store. It's not hard. You need an accomplice. The accomplice swaps two items on the shelf. You take one of the misplaced items. You get charged for the other. But that's not the...

View Article


Traffic I: Why is the Other Lane Always Faster?

"This highway has four lanes. One of them is the fastest, and there's a 75% chance we're not in it." Last year, I switched from the Google office in San Francisco, next to where I live, to the Mountain...

View Article

Traffic II: Why does the Fast Lane become Slowest in Traffic?

As I drive up to San Francisco from one of the freeways (either 101 or 280), I'm approaching the inevitable traffic stoppage. The freeway is clogged and it seems I'm up for a 15 minutes in...

View Article

Traffic III: Why doesn't Changing Lanes Always Work?

Recall in the previous post, the lanes with more traffic flow (with more cars per minute passing a certain point) back up more when there's congestion. This can be summarized by the following picture:...

View Article


Spring Break!

One might notice that the posts in my blog kind of follow the school schedule. Last time I posted around Christmas, and this post was written at the end of March. Well, that’s because I am on a spring...

View Article


I de-lid Core i7 9700k and I have no idea if it was worth it

My old CPU was up for an upgrade (I've had it for 5 years), so I've built a new one. And since I've been studying Machine Learning, I needed way more computing power than I had. When overclocking my...

View Article

Traffic IV: How to Save 10 Minutes on your Commute, or the Mystery of the...

Driving on a highway is like picking stocks. There are multiple lanes, and as we established earlier, one of them is just faster than the others. Drivers take notice; they move into the lane just like...

View Article

What is the gradient of broadcasting?

"What is the gradient of numpy broadcasting?" I was wondering the other night. It's almost midnight, my brain is tired, and I got a bit stuck. In short... In numpy, broadcasting is adding a...

View Article

Lessons from a Smiling Bot. Lesson I: Training/Serving Skew, Second Opinion,...

Most Machine Learning courses at Stanford require coming up with a relevant project and delivering it before the course deadline. For the courses I've passed earlier, I've built a similarity-based wine...

View Article


Lessons from a Smiling Bot. Lesson II: Get Features from Production

Other lessons The lessons I've learned when building a Smiling Bot: an embedded CNN model for the deep learning for Visual Recognition course at Stanford. Lesson I: Training/Serving Skew, Second...

View Article

Lessons from a Smiling Bot, III: Customers don't Care it's Hard

Other lessons from a Smiling Bot The lessons I've learned when building a Smiling Bot: an embedded CNN model for the deep learning for Visual Recognition course at Stanford. Lesson I: Training/Serving...

View Article


The Blog Turns... 10 Years!

Today is 10 years since I wrote the first post for my blog. Ten. Freaking. Years. It's almost hard to believe that I had something remotely meaningful happen in my life 10 years ago. So.. uhm, what...

View Article

I'm now Stanford-Certified with a Non-Degree Certificate

Would you like to dig deep into Deep Learning, but don't know where to start? Do you want to work on Artificial Intelligence, but fear you don't have enough intelligence? Trying to remember what...

View Article


Why Fast Models are Destined to have a CPU Training Bottleneck

I was working on fixing the problem with a slow two-stage detector in my Smiling Robot by writing a faster deep detector from scratch. There's ample research on fast detectors, but feature...

View Article

Writing Neural Face Detector from Scratch (sneak peek)

After working on perception models at late-stage startup, I realized there are large parts of these models I didn't even touch and didn't know existed. These pieces were working well, so why touch...

View Article

How to Literally Ask Neural Network for Help and Watch It Deliver

This is one of the small fun things I've learned while working on writing a face detector from scratch for the v2 of the Smiling Bot. Single-Shot Detector, like many other detectors, employs...

View Article

Tidbyt: Someone's Making the Muni Sign!

I had my first “Silicon Valley” moment about 8 years ago. After I hacked together the Muni Sign, I mostly got some mentions on a variety of hacker websites. Then, some kind Muni employees invited me to...

View Article


Turing Test Needs an Update, or: How ChatGPT Ran a Test on Me

Briefly: ChatGPT, a chat app based on a large language model, has opened the floodgates of experiments, media attention, robots-taking-our-jobs scares, generative AI startups, and inventive,...

View Article

Browsing latest articles
Browse All 113 View Live




Latest Images