Artificial Intelligence on the Sports Scene

There is a startup called Statsheet that is doing sports coverage for Division I basketball teams. The surprising thing is that the updates are all done by Artificial Intelligence. However the come out looking like they are written by a human being.

The project is around 6 months old. A program takes box score data and turns it into text that is looks just like a human wrote it. I tell you some samples I saw were amazing.

Great. Just when the reporting industry is about to go out of business, RoboReporter comes and put the nails on the coffin. There is a benefit. Even no name basketball teams are going to get great coverage. At least mom will be happy when she reads the report on Junior's basketball win.

Learning how to Code

How do you learn to be a good coder? Well you can get somebody else's code and hack it. That's how I started learning. You can also dive into someone else's unit tests to figure out what they are doing.

It is best to inspect a small project's code. That way you will not get overwhelmed or lost. Check out code from dudes who are gurus at software. You should also look at the source for any libs you use. Trace down what happens when you make API calls.

Reading other people's code is an easy way to learn what to do when you code yourself. However the very best way to learn coding is to just do it. There are many apps waiting to be written. What are you waiting for?

MultiCore Design

Virtualization let's you scale applications on multiple processors. This allows multiple nodes to run in parallel, giving you a performance gain. You might have 10 times as many instances of your application running. This is easy to set up, but might not be optimal speed wise. It works best if there are a small number of dependencies in your application.

The problem with this technique is that hardware is no longer getting exponential increases in power and capacity. Therefore you would be better off designing your applications for the multicore processors out there. Normally this means using a threading model which might be complicated. You can cheat a little by using a thread pool with a bunch of worker threads.

There is not usually a need to entirely rewrite your applications to make them support multicore. You got to put some synchronization. And you must make sure race conditions and deadlocks do not occur in your code. Model driven development can help with this task. Refactor your apps for multicore usage, and you will see a big gain in performance.

Software Engineering Method and Theory

There are a bunch of industry veteran trying to discern the universal truths of software development. They have formed the Software Engineering Method and Theory group. It is called SEMAT for short. Some industry luminaries like Ivan Jacobson, Bertrand Meyer, and Larry Constantine are involved.

This group wants to investigate the core theories and best practices in the development world. They state that this group is not about any specific product of standard. They are attempting to uncover the universal set of practices that occur in software development.

SEMAT has broken out six working groups. These include terminology, kernel language, universals, core theory, requirements, and assessment. The group reiterates that it is no looking to create a new development methodology. Instead they are defining software development patterns and practices.

There are some who have their doubts about this effort. Universities lag the industry in practice. It make take many years for the work of this group to bear fruit. This is a theoretical exercise. There may not be any impact to real world development. Something like this was tried before with the Agile Manifesto.

Self Repairing Code

Researched at MIT and the University of Washington are working on software code that repairs itself. You heard that right. This technology is called ClearView. It requires no human intervention.

The new technology knows and understands the normal behavior for software. When it detects some problems, it comes up with multiple options for the fix, and chooses the best one.

This is supposed to be a good way to combat hacking. I guess you could think of it as some type of intelligent system. Self healing code makes for a good headline. However I can't imagine this working for anything but the most simplest of bug fixes. There are plenty more categories where you need an old fashioned maintenance programmer.

How Does printf Work?

An author at the Hostile Fork blog decided to answer a question on how the printf function actually gets implemented in C. This came from StackOverflow. It was assumed that it ended up with some inline assembly code. Let's see what he found out.

The truth of the matter is that it depends on the implementation of your compiler. Hostile Fork guy checked out the GNU C compiler. Turns out printf calls vfprintf with stdout as a parameter. vfprintf calls some macros. They do a putc to a buffered output.

In the end, the calls map down to the write function. And lo and beyond, this becomes a syscall. Next homework step is to trace how Microsoft Visual Studio handles printf.

Framework or Custom Code

I read an interesting discussion on Slashdot. A developer had some simple requirements for an app. Then he entered a long phase of scope creep. The original implementation utilized the Spring framework as well as Hibernate. However the new requirements needed more than the frameworks chosen could provide. This scenario generated a lot of talk on Slashdot.

The original developer in retrospect thought he should have used JDBC to implement the requirements. Then any new reqs could be implemented with custom code. Senior developers agreed. You got to know when to use a framework, and when not to. In general, you should skip the framework if you are developing for a long lasting project.

Some believe Spring to be an evil framework in general. They say that removing Spring saves development time in the long run. Others say that frameworks in general are not bad, but Spring is no good. All of these frameworks are decisions made during the design phase. You got to get your design correct.

There is a benefit to using framework. You save time. There can be a lot of wasted time if you try to code your own framework, or code everything by hand. You could choose a compromise. Skip the Spring framework, and use JDBC with Hibernate.

You also cannot rely on the framework for everything. It does not come out of the box supporting all of your specific requirements. We use some high level frameworks in our system for general programming purposes. When necessary, we step back and roll our own code when need be. We also make use of some third party tools to take care of mundane tasks. It is a delicate balance which requires some experience to make.

Remote Pairing

I have done pair programming in the past. Sometimes we get a lot of benefit from it. However this is not an XP technique that is used often by programmers. In my own project, it is hard because the team is spread out all over the place geographically. Is it possible to conduct pair programming remotely?

One columnist tried it out. He found that tools were not mature enough to handle this. His system froze a lot. In the end, they just tried a virtual connection. It is better to do pair programming in person.

Pair programming in general helps eliminate distractions you would encounter if you were on your own. However it may impede progress. Most devs feel that they can accomplish more on their own. But the real question is whether pair programming improves code quality. I don’t think the verdict is in yet on that decision.

Agile Development

Here are some notes on the agile movement overtaking development teams around the world. The goal is to have short quick releases, and more of them. It includes Test Driven Development (TDD). Quality is engineered into the product from the start.

It is best to use one project management tools for all your needs. This encompasses requirements gathering, source code control, bug tracking, and even testing.

You can make a part of your development process an agile one. There is often a lot of politics involved when moving to an agile technique. You should know that not all development projects are best suited for agile. Some work better using the waterfall method.

Here is one agile technique that I love. You strive to automate most if not all of the status reporting. This sounds like nirvana for team leads that normally spend a lot of time collecting and compiling team status reports.