Challenge#2 Reverse words in a phrase

Sorry for the delay in coming up with a new challenge. It’s been a busy few weeks. Last challenge was about partial sort. This week’s challenge will be about reversing words in a phrase. It’s a common challenge and many of you have probably seen it already. Task: Given a string with some words, produce …

Using functional forms of amend

In one of my previous posts, I talked about functional forms of select, exec, update and delete. I also briefly touched on the importance of functional queries and why you should get used to them as much as possible if you are serious about q. In this post, I will talk about functional forms of …

Challenge#1 – Partial sort

One of my colleagues recently introduced me to Project Euler. Project Euler is a great way for you to solve mathematical problems using your preferred language and then compare your solution with others. However, I noticed that most of the problems there were not practical for q. Many were designed to use loops which are …

Scan and Over – iterating through lists

One of the first things I was told by my ex boss was to never use for/while loops unless it’s a matter of life and death. And he was dead serious. I had just taken two c++ classes in college so wasn’t sure how I would be able to replace for/while loops. They are easy …

qSQL queries for performing analytics

I realize that there are many developers out there that are not looking to get into q completely and are simply using q/kdb+ along with qsql to perform analytics (i.e. quants). My job requires all of this so I have some good experience running qsql queries. Of course, the type of query you need to …