Save your data, even if your project is half-baked and you think your done with it. Years ago in 2014 I got access to an interesting dataset, and used it to come up with some potentially useful conclusions about valuing homes for sale. For whatever reason, today I remembered the work and went to dig up the data and project files to refine the queries and create a model… only to discover the data is permanently gone.
[Read More]
Rust Ownership
Comparisons to Other Languages
While learning Rust you encounter the “borrow checker” and the concept of ownership. The borrow-checker automatically does checks you’d probably be doing in your head when programming in other non-garbage collected languages anyway. If you don’t think about ownership when coding in C++, C or Pascal, for instance, you may end up debugging strange behavior or segmentation faults when you run your programs.
[Read More]
Notes on Speeding Up Python With Native Compiled Code
A Quick Look at Pybind11, Cython and NimPy
Here are some rough notes on the topic of speeding up Python with modules compiled in another language , and importing libraries written in C++.
[Read More]
Optimization Part V: Applying Data Oriented Design Principles
Optimizing Data Flow on a Data Intensive C++ Application
Today I’m going to focus on data-oriented design inspired optimizations. Previously, I also did a handful of API improvements made obvious from a flame graph profile, and then replaced all uses of the STL “unordered_map” type with a more efficient implementation of a flat hash map.
[Read More]
Notes for a Sequel/JRuby/SQLite Bug
A Bug in Sequel, JRuby + SQLite DATETIME type columns
Accessing SQLite3 DATETIME column data with the Sequel gem “jdbc” SQLite adapter produces different date types for the DATETIME columns than does the MRI Sequel adapter. So, you get ‘Time’ objects in the result sets when using standard Ruby, but ‘Date’ types when using JRuby. The ‘Date’ objects don’t have a time component; the ‘Time’ objects have both date and time.
[Read More]
Exploring the Crystal Language
Type Inference
As a long time Rubyist I’ve been intrigued by the Crystal language for a while. Crystal is a compiled statically typed language that uses Ruby syntax pretty much wherever it can. Now the Crystal language approaches a 1.0 release later this year and I wanted to try it out.
[Read More]
Developing Software is Developing Knowledge
Why Agile Methodologies Work
Software development is the art of transforming vague requirements into precise statements executible by a machine, resulting in a working software system. Almost by definition you can’t begin a project with perfect requirements; if you did so they would be executible or translatable on their own with no need for further development. The reason “Agile” development methodologies have persisted is that they are designed around this basic truth.
[Read More]
Optimization Part IV: Profile Guided Optimization
In a previous article on optimization we looked at how to read a flame graph and discover areas of a program that could benefit from optimization by re-writing the source code.
[Read More]
If You Liked Pascal
Glimmers of Pascal in Three Modern Programming Languages
Each of these relatively new languages takes after Wirth family languages like Pascal or Oberon, and particularly Turbo Pascal. In spirit or small details or tooling you’ll find something familiar. Here are my sort of random observations on Nim, Kotlin, Go
[Read More]
Optimization Part III: Better Hash Tables
After you have done the obvious algorithm commplexity analysis on your C++ application in code you’ve written, what’s next on the list for ways to optimize your application? How about looking for more efficient implementations of standard data structures in libraries?
[Read More]