System languages should include Webapps

I was reading an FAQ today about some subtle C++ point and I came across a comment that explicitly excludes the beginning language-learner. By the way, it confuses most novice C++ programmers that private virtuals can be overridden… However the private virtual approach is now common enough that confusion of novices is less of a concern. This left me frustrated that a language that has been core to my personal success so flippantly brushed aside its future user.

4 Simple Steps to Run D Language in Azure Websites

I shameless stole these steps from 4 Simple Steps to Run Go Language in Azure Websites. This post is simply a transliteration to D. Thank you very much to Wade Wegner for the original post. 4 Simple Steps Create your Azure Website in Azure Portal. Configure FTP deployment 2. Run dub init vibed_hello_world --type=vibe.d and change the default app.d to read the port from an environment variable.

Property Driven Design: MinMax

I wrote an article on Property Testing about a year ago. Isocpp.org even linked to it which was pretty cool. Recently, I uncovered a fantastic talk by Jessica Kerr about property testing. Kerr’s talk reinvigorated my languid research effort toward generated testing. Kerr presented the idea (novel to me) that properties aren’t rigid. Properties don’t need to exclude all possible incorrect results for a given function. Properties simply must reduce the size of the incorrect space. This may seem like semantics, but it is easier to exclude a wild-ass-guess that verify it is correct. Additionally, some domains may not have a solidly defined answer,a nd the result my be probabilistic in nature. This post will focus on deterministic problems for the moment, but realize that property testing is vastly more general than mundane example testing. How properties reduce the size of the problem space makes me imagine this Figure.

sometimes_code_gives_you_a_wtf

Following Kerr’s references, I found a set of projects from a predicate-logic course. This course provides 20 separate projects excellently cast for a property-driven-design tutorial. These projects are unique since besides the typical requirements they enumerate the predicate functions each requirement typifies. Predicate functions are to a predicate-logician as properties are to a computer scientist. These enumerated properties (predicates) clarified many points I misunderstood about property testing.

This post will step through the design of the first project minmax using C++. My primary goal for this article is to address a concern raised by a colleague, “Does pulling in more complexity — a fancy test generator — actually increase quality?”

Recasting how I blog

I wrote my first article for codestrokes in February 2011 - right as I was accepted to graduate school. My goal was to improve my writing in preparation for writing a thesis. While through grad school I started with more traditional writing tool. I started to learn to write, and I found my writing style: Simplicity. I started writing with a big fancy word processor. I blogged with a massive database backed blogging engine. By the time I finished my thesis, I was writing in vim. I used a makefile to check spelling and check for simple grammatical rules. The process was much simpler to manage. This motivated me to convert my blog to a static site. This post describes my process on simplifying my writing process.

Property Testing in C++

Currently, I'm on a testing kick. One might say tests are shiny. I don't know if they are really shiny as much as I found another cool use for uniform_int_distribution<>. A use which, as a side effect, might make me appear to be a better software developer. (This assumes a negative bug rate is proportional to better software). I've started playing with Property Testing. Property Testing is a form of unit testing where the programmers defines properties, or invariants about the code. A framework library (ok, seriously its a framework because it calls your code) generates random constrained inputs and calls your test functions. It's pretty cool, and while I was playing around with the framework, I found a real bug, related to my ignorance of C++'s auto type deduction.

Let's steal a simple example from my CSE 565 Software Verification class: a payroll function. Here is the specification:

What is a Unit Test?

I’m taking a Software Testing and Verification course as part of my Master’s work. Our first assignment was to write a short paper describing a unit test, then implement selection sort and test it under that philosophy. Sarcastically, I commented to my colleagues the triviality of this question. The first response was, “Wow, I don’t think that is such an easy question.” A technical discussion ensued. This is that log. Definition 1: Given a function in the mathematical sense, i.

Goodbye Project Euler

A group of friends and I have been working on project euler for about a year now. I learned a great deal from this fantastic project, and it was the first time I was able to get a real handle on Haskell. Project Euler taught me make. It taught me better performance reporting techniques, honed my octave, and got me over that initial mind bending hump of Haskell. Thank you Project Euler, you will be missed.

Design for Testability via Security

I was discussing bootloader design with a colleague of mine the other day. We were attempting to load new a third-party hardware component. The device has a poor protocol, and a useless verification step. This discussion got me thinking however how the concepts used to build a strong self-enforcing security protocol, also apply to building a testable, and reliable communication protocol. Thus, security helps us build better products not because they are secure, but because they are verifiable.

Massively Intelligent Non-Deterministic Luminating Effortless Super Solver

I worked the title of this article several times before I finally settled on the subtly epic heading you see above. Hopefully this title will funnel people off google into my blog (delicious SEO). I wanted to push the A.I. component of my solution because A.I. is awesome and mysterious, and cool (and can like solve jeopardy). I was quickly disillusioned however. Really, A.I. isn’t magic, rather it’s just the same thing computers have been doing for a long time: computing. Sadly this realization took several months in an A.I. class before I was sufficiently crestfallen. A.I. patterns including the hill climbing algorithm used here are indeed “intelligent” but really it a reflecting of the algorithm designer, not the entity executing the algorithm. So I built a substitution cipher solver in C++. It’s fast it uses random numbers i.e. non-deterministic, it uses an A.I. algorithm i.e. Intelligent, it uses threads i.e. Massively, it deciphers i.e. luminates the text and it solves super stuff therefore the title is completely justified. I give you my Massively Intelligent Non-Deterministic Luminating Effortless Super Solver (MINDLESS). If none of that interests you then please stick around and follow the side quest of looking for emotionally charged parenthesis.

Sean Parent: No Raw Loops

A group of colleagues and I watched Sean Parent’s Going Native Talk on “C++ Seasoning”. Parent takes some extreme views on how to use C++, but his examples for using the STL to simplify code are phenomenal. For a recent AI project I decided to apply Parent’s goal of “no raw loops”, I was blown away by the transformation… err std::transformation this had on my code. In this post I indented to demonstrate several complex code blocks, or overly specific code blocks what were replaced by some STL magic.

rand() Considered Harmful

Stephan T Lavavej (STL) is a tactical speaker. In a short amount of time he convey’s essential accurate information which is immediately applicable. In this talk at Going Native 2013, STL takes 20 minutes to teach us how to properly use random numbers in our programs: http://channel9.msdn.com/Events/GoingNative/2013/rand-Considered-Harmful

Simplicity Does Matter!

I’m been sitting this draft for too long, but before I started my research experiment with Haskell I was looking for a language. I was approaching an AI class for my graduate work, and thought I’d learn Lisp, or at least a lisp. Clojure was hot, and new (read shiny), so I dove into learning about it’s virtues. It’s virtues are embodied in its creator, Rich Hickey, who while being a great programmer is a fantastic speaker.

A Thunk on Laziness

I originally approached Haskell excited, and wide-eyed mystified by the type theory. Type became my golden hammer. In my C programs I typedef’d everything so it’d have a “unique” type. I was cautious with my casting. I was hooked. I had an intuitive understanding of laziness, as implemented by Haskell, that would allow one to write”streaming” algorithms. That is programs that deal with data in an online way to process data as it streams through.