K&R . . . check!

Study of King DavidSource Code:  Kernighan and Ritchie The C Programming Language Code Examples

I’m happy to say that I finally completed my effort to work all the exercises in the classic “The C Programming Language” book by Brian Kernigham and Dennis Ritchie (co-creator of UNIX). What started as a side effort to reinforce pointers and memory management as part of my efforts to write a Scheme interpreter supporting my efforts to work through another classic “The Structure and Interpretation of Computer Programs” turned into an eight month effort (mainly due to my lack of time for side projects).

The effort did reinforce that the C programming language is certainly the king of procedural computer languages. There is nothing a von Neumann architecture computer can do that cannot be programmed by ‘C’ and converted into machine code by a good compiler. However, this king is an old king. Yes, garbage collection, object-orientation, concurrency, and JSON encoding can all be done using ‘C’ from either scratch or via open source libraries. Yet, I’m concluding that the effort outweighs the gain when languages such as ‘Go’ and ‘Rust’ coming into their own.

I have mixed emotions. I’m overjoyed to have re-mastered this language using one of the most classic programing language books to do it. But, overall I would put this effort down as a “failed experiment” from which I have learned that I probably need to look to a more modern language (I’m going down the ‘Go’ route) to fill my needs for a “get the job done with no BS” general-purpose language.

All that said, I can confirm “The C Programming Language” is a truly great book. This single book takes the reader through all aspects of classic ‘C’ (it has not been updated to the latest language standards). In the process it also works through basic implementations of classic algorithms and data structures: arrays, queues, linked lists, hash tables, binary trees, binary search, shuffle sort, quick sort, and a simple recursive decent parser. The book also covers implementations of basic standard library functions using low-level operating system calls. By the end of the book, you will have completed a tour de force of the basics of this classic language. I still highly recommend this book to any developer serious about their craft.

Here is a link to my exercise solutions: Kernighan and Ritchie The C Programming Language Code Examples

A Garota Que Anda à Noite (“A Girl Walks Home Alone at Night”)

I just finished watching one of the most amazing movies I have seen in a long, long, time–Ana Lily Amirpor’sA Girl Walks Home Alone at Night“. Yes, I know, it only has a 7.1 currently on IMDB but, oh, this one could be a classic if it receives more exposure. Take a look at the trailer and consider watching it on Netflix or direct from Vice films.

Amirpor describes it as “Iranian Vampire Spaghetti Western” and I agree with the attribution if one also throws in Film Noir. This is not an egregious horror flick–it is subtle, subdued, and sexy. There is a touch of drugs, a touch of violence, and a big heaping dose of good story.

Strangely enough, with the soundtrack and underlying love story I found myself even thinking of Pump up the Volume. I know the comparison is a stretch since Amirpor’s soundtrack is all Iranian artists but I draw the comparison in that both of these movies have introduced me to a host of new artists and expanded my taste.

The film debuted at Sundance in 2014 and is an extended version of a short film that won “Best Short Film” at the 2012 Noor Iranian Film Festival.  Even thought it was filmed over just 24 days in California, this is an Iranian film (in Persian with subtitles) at heart and produced by an amazing new director whom I hope goes far. It has been making the film festival circuits and nominated at numerous ones. Hopefully it may make the jump to the mainstream. I was led to it from A Taste of Cinema’s “14 Movies From The Last 5 Years That Have The Potential To Be Future Cult Favorites.

This film is an absolute must see for film aficionados. I really cannot write much about it without giving it away, but I will say it has made my personal Top Ten movie list. The only thing I could think to bump from my list to make room was Citizen Kane–yes, it is that good. This is ironic for it one the “Citizen Kane Award for Best Directorial Revelation” at the “Sitges” Catalonian International Film Festival.

I highly recommend this film.

Article Summary 2015-06-26

“What Is Code? If You Don’t Know, You Need to Read This”

This is probably the best quick summary explaining what software (and computers for that matter) really is. Thank you to Laura Haverkamp for bringing this one to my attention. There is also a good “Behind the Scenes” article. And, I have taken the pages, cleaned them up, and produced an Evernote Summary.

“Electron Microscope Slow-Motion Video of a Vinyl LP”

A great video of a needle reading the grooves of a vinyl record from the guys at Applied Science. Ben Krasnow goes through the process he pursued to be able to make this video. Ben maintains an awesome YouTube channel.

“Killjoys Really is a Most Excellent Space Adventure”

io9 goes on to say that it may (finally) be our next Firefly. I’ll believe it when I see it, but you can bet this one makes my list of shows to binge watch once the first season has concluded. (P.S. If you are a Firefly fan, please vote it up on IMDB.)

Math Puzzle: “The Nine Schoolgirls Challenge”

“Fifteen young ladies in a school walk out three abreast [as a group] for seven days in succession: it is required to arrange them daily, so that no two shall walk twice abreast.”

This problem launched a whole branch of mathematics called combinatorial design theory. A young mathematician, Peter Keevash, has made some breakthroughs with respect to the general case problem within which the above puzzle lives.

“‘EPIC’ fail–how OPM hackers tapped the mother load of espionage data”

An excellent and detailed summary of what is probably the most truly damaging hack of government systems in terms of individual safety.

“Building Prototypes by Dan Gelbart”

Hackaday has pulled together an excellent series of 18 videos of Dan Gelbart demonstrating a whole series of mechanical prototype development techniques. Dan was the co-founder of Creo–a company that developed laser-based products for the printing industry and sold to Kodak (remember them) for $1 billion. Dan has gone on to become an award-winning entrepreneur and inventor. He teaches Mechanical engineering at the University of British Columbia.

“Leading People When They Know More Than You Do”

Truth is that in a knowledge worker career (such as software development) folks who move into management will be managing folks who know more about the task than they do and, in addition, who may be more highly compensated. This is not the “Peter Principle” which is more applicable to the Industrial Revolution as opposed to the Information Age. Instead, it is a natural outgrowth of the realities of knowledge workers. This article is one of the best I’ve read so far providing practical advice for managers and executives who find themselves in this situation.

“Grady Booch on the Future of Software Engineering”

Grady Booch (blog) speaking at the 37th International Conference of Software Engineering (ICSE 2015). This is an excellent discussion about both the history and the future of Software Engineering.

Grady is the guy that developed the Unified Modelling Language (UML). He was also the Chief Scientist for Rational Software Corp and IBM Research. He is both an ACM and IEEE Fellow and he won the Lovelace Medal in 2013. He has also worked for Facebook.

 

Article Summary 2015-06-10

“Chess piece moving patterns”

I think it would be really cools to mount all of these pictures in some sort of a display.

“Million Base is a database of 2.2 million chess games. Steve Tung (@_tungs_) visualized chess piece journeys based on this data, for each piece on the board. Above is the footprint for the white knight. Each thin line represents 500 moves, and from what looks like a little bit of random noise to offset each line, you see a more prominent path for more frequent hops.”

“Meet Margaret Hamilton, the badass ’60s programmer who saved the moon landing”

I am really happy that more and more good information about women software developers is coming out. This is about Margaret Hamilton who led the MIT Instrumentation Lab that developed the software for the Apollo Guidance Computer. If you’re interested, the source code is also available.

“Why Firewalls Won’t Matter In A Few Years” (NSFW)

When I was leading engineering at nCircle (now a part of Tripwire), we developed a saying that firewalls are like that Farside cartoon with the polar bear taking a bite out of an igloo–crunchy on the outside, soft on the inside. Well, this article too finds little value in firewalls over time and makes a great case for why. A good read and watch but the video is not safe for some work environments.

“Geeks, MOPs, and sociopaths in subculture evolution”

An interesting analysis of what happens to subcultures. I find it pretty accurate from my own experiences.

“DARPA commissions killer robots to kill targets without human help”

This is a pretty interesting little glimpse into what will ultimately be upon us. I have not bought into all the artificial intelligence fear mongering going on now; however, I have thought ever since reading Manuel de Landa’s ‘War in an Age of Intelligent Machines’ that we are headed for a day of autonomous warfare. And, here it comes . . .

“Vim speed is not really the point”

Ah, good old vi. It lives forever. Who needs fancy and complex Integrated Development Environments (IDEs) when one has vi.

“Researchers Find Missing Link Between the Brain and Immune System

Your brain and your immune system really are linked.

“Sony Finds ‘Dark Tower’ Movie Director In ‘Dragon Tattoo’ Writer”

I am so excited! My favorite Stephen King series, The Dark Tower, is being made into a movie; however, I have no idea how they could squeeze so much into one movie.

Reality doesn’t exist until we measure it, quantum experiment confirms”

Scientists have physically fulfilled a famous thought experiment (“gedankenexperiment” or, simply, “gedanken”) confirming quantum physics predications that it is only through observation that reality as we know it comes into existence. Now there are debates about what constitutes an “observer,” but it does seem from a quantum perspective that we really do create our reality.

Article Summary 2015-05-29

44 years of UNIX, Time-lapse Photo Mining, Self Healing Buildings, Free NASA Code, Realtime User Monitoring, Email for Apple Watch, Two-thirds of Europeans Have Same Fathers, New Language for FPGAs, Smartphone with Projector, and Light Bulb with Speaker.

“A Repository with 44 Years of Unix Evolution”

This is one of the coolest things I’ve seen for a nerds and geeks alike in a long time–a GitHub repository that traces 44 years of evolution in the UNIX operating system code base from 1972 to 2015–659,000 commits from 850 identified individual contributors.

“Time-lapse Mining from Internet Photos”

These guys mined 86 million public photos then collapsed ones of places into a common viewpoint. From that, they were able to develop time-lapse videos. Their detailed paper is an amazing read.

“The First Building That Can Heal Its Own Cracks With Biological Cement”

Self-healing buildings.

“It Is Rocket Science! NASA Releases Abundance of Free Code”

Open source code from NASA

“How to provide real user monitoring for single-page applications”

Discusses three challenges single-page apps (SPA) face with respect to real user monitoring (RUM) along with a solution path for Angular-based SPAs using Boomerang.

“How To Send a Hidden Version of Your Email That Only Apple Watch Will See”

Discusses how to craft email messages to specifically utilize the capabilities of the Apple Watch.

“A handful of Bronze-Age men could have fathered two thirds of Europeans”

“Genetic study reveals that two-thirds of European men can be traced back to just three individuals who lived between 3,500 and 7,300 years ago.”

Presents even more detail on the research into the Y-chromosomal most recent common ancestor (“Y-MRCA” or “Y-chromosomal Adam”) and the matrilineal most recent common ancestor (“MRCA” or “Mitochondrial Eve”). If you want to have your genetic ancestry documented, there are some services that can give you a genealogical DNA test.

“Enginursday: A New Approach to FPGAs!”

To increase the usability and approachability of Embedded Micro’s Field Programmable Gate Array (FPGA) “Mojo” development board, they have released a new language named Lucid. Lucid should make customizable hardware as approachable as the Arduino made embedded microcontrollers. Hopefully once things calm down with my bookshelf project, I can start playing with one of these fellows.

“Lenovo’s Projector Phone Beams a Touchscreen Onto Any Surface”

For at least a couple years now, after seeing the projected keyboards and miniature video projectors, I have been saying that what someone needs to do is create a phone that integrates the two. I was specifically thinking of something that could project your view onto a wall at the same time it could project a keyboard. Since this only has one projector it cannot do both yet, but it is certainly getting closer. Not available in the States.

“Sony’s LED Bulb Doubles as a Bluetooth Speaker”

Now if they could only get a variation of this out that supports changing the color like the Philips Hue, one would have the ultimate in mood lighting. But, none the less, this is pretty cool. Also not yet available in the States. (Do you sometimes feel like we’re lagging a bit these days?)

Article Summary 2015-05-21

Usually I send out the articles one-by-one to one or more people who I think might be interested in them. Other times, I post it to my Facebook or LinkedIn feeds. For some, clip them into my Evernote ‘Articles’ notebook so I can reference them later (which also filters out the ads). Finally, others I bookmark on my Pinboard shared browser bookmarks log.

In thinking about all this, what I have been doing is not that effective for the following reasons:

  • I am probably making incorrect assumptions in the filter bubble I inevitably create by only sending some articles to some folks.
  • I create much disjointed work for myself by being inconsistent about distribution.
  • I actually make it harder to find articles when I later need them.
  • I also make it harder to refer someone new to an article I somehow sent to someone else if they might be interested in it.

Today I am trying something new. Periodically I will then publish up to ten of the best in a simple post like this one on my blog which cross posts to Facebook, Twitter, LinkedIn, and Tumbler. Eventually, I will also send a link to the post out to all individuals who might be interested in at least one of the articles and to a general mailing list folks can sign up for if they always want to receive the post.

Without further ado, here are is the first installment:

“Boeing Patents Sci-Fi Force Field That Deflects Explosive Shock Waves”

Boeing has a way to create a “Laser-Induced Plasma Channel” (LIPC) that can absorb the shock wave produced by an explosion. While it will not divert the projectile itself, it does divert the destructive shockwave. Thank you to Josh Garrett for sharing this article.

“Jeremy England, the Man Who May One-Up Darwin”

It may be alive, but does it have a soul? Thank you to Jerry Horne (blog) for sharing this article.

“Haskell Programmers Are Liars: Or, The Real Way to Generate a List of Primes in Haskell”

Setting the reaction provoking, click-bait, title aside this is a really interesting article on Melissa E. O’Neill‘s correct approach to the Sieve of Eratosthenes implementation in Haskell.

“Ember.js: An Antidote To Your Hype Fatigue”

While certainly written with a bias towards Ember.js, this article does have a wealth of good background information on the wide-range of front-end JavaScript frameworks. It then goes on to provide an overview of Ember.js.

“Wolfram Language Artificial Intelligence: The Image Identification Project”

Being a fan of Stephen Wolfram, I have highlighted many of his articles before. Here is one reviewing their new image recognition efforts. More than just a product announcement, it goes into his background assumptions and development efforts openly discussing the challenges he faced.

“The revolutionary Lily Flying Camera Drone is brought to life thanks to 3D printing”

An amazing drone that follows you around.

“DARPA Aims to Accelerate Memory Function for Skill Learning”

DARPA is looking into “memory replay” (Restoring Active Memory (RAM) Replay) as a way to help folks remember events and learn new skills. Johnny Mnemonic will be just around the corner.

“DIY Lock Cracker”

A very clever “robot” for cracking the Master Lock combination locks. Very cool.

“New Sentry Electronic Fire Safe Opened in Seconds with No Sign of Entry” (video)

And, while we are on the topic of breaking into things, the money starts at 3:55 into the video. It is amazing what rare earth elements can do and how inexpensive they can be. Here is where you can get one of those magnets–195.8# of pull for just $88.99.

“Mad Max: Fury Road”

I have not yet seen it, but there are some interesting positive reviews coming in on what had looked to me to be not much more than a nonsensical action movie. Also, it is getting some interesting press about subverting movie sexism.