-
Introduction to TF-IDF and Machine Learning: Part 2 – Machine Learning
Ranking Search Results A search engine returns hundreds of documents for a query of a few words. Which documents are “better” matches to the query? One approach is to treat the query itself as a document and calculate the cosine similarity (see Part 1 of this series) between it and each of the returned documents.… Read more
-
Retirement Planning: Bucket Budget Debunked
Spreadsheets Are Programming Too Watching the stock market recover dramatically since the bottom was hit in 2009 when all hopes for not dying at my desk in a windowless office somewhere were dashed, I’m suddenly in a mind to work out how best to budget retirement though it’s still likely ten years or more away.… Read more
-
Introduction to TF-IDF and Machine Learning: Part 1 – Cosine Similarity
Goals My goal here is not to provide a detailed how-to for creating a machine learning system. Most people who do anything with machine learning will be using systems already built into tools such as Splunk, Elastic Search or other such software. I’m only seeking to provide some basic understanding of how machine learning systems… Read more
-
Commenting Code
Bad Advice I’ve encountered a lot of bad advice about commenting code over the decades. I’ve known developers who insisted that commented code is actually worse than uncommented code because the comments will always be wrong or out-of-date. But even dated comments give a clue about the original intentions of the code and how subsequent… Read more
-
Writing Builders for Complex Data Structures
1 Introduction New objects are usually created by using the “new” operator and possibly passing a number of arguments to the constructor. But for classes with many properties or with a more complex structure, the number of parameters the constructor needs becomes unwieldy or intractable. Allocating an uninitialized object and then initializing its properties with… Read more
-
Pragmatic Unit Testing, Part 2
4 Integration Testing REST Services Now, we’ll look at using junit to do integration testing of a full REST service. This will work much like functional tests in that we’ll first test creating resources, then test the rest of the CRUD operations by operating on such created resources. But first some preliminaries.
-
Pragmatic Unit Testing, Part 1
1 Extreme Programming Extremism Dark chocolate is good for you. It’s good for your heart and may prevent cancer. But no one should take consumption of dark chocolate to the extreme and eat it for breakfast, lunch, and dinner. That wouldn’t just be silly, it would be decidedly unhealthy. Yet a current fad in software… Read more