programming Archives - Page 2 of 3 - Ravi Desai

Do not do raw parallel programming

I previously had a blog post on thread-safe programming, where I said I wanted to do it, and that I know how mutexes work and I should start from there. That post has been wiped off the face of my blog. I’m not going to do low-level parallel programming for the foreseeable future. I came […]

Ruby: Select random element from array

This is a cool little trick I picked up from StackOverflow. Select random element of an array [:foo, :bar].sample Its the Array#sample instance method. Good to know.

Moneris payments from wordpress

I had a wordpress subcontract the other day for a site thats mostly built up. My job was to make sure payments were going through the Moneris payment host. I’d never done anything like that before. Fun stuff. The first problem I ran into was that Moneris didn’t have publicly accessible documentation for their API. […]

Web scraping in unix

I don’t recall why I was looking into web scraping a few weeks ago, but I felt the need for it. I always wondered how this works, and its basically a lot of regexps. Fun stuff. It gives me a great opportunity to brush up on my regexp-knowledge. Tools Curl For unix systems, just use […]

Inquiry cart plugin for WordPress

Update: 1-Feb-2014 I’ve been receiving requests for updating this plugin for WP for over a year now. I don’t work with WordPress anymore. I now program in Ruby, mostly with Ruby on Rails. I would highly recommend every WordPress dev do the same. Life is better on this side of the fence. WordPress is a […]

Tutorial for Hunchentoot

I’ve been in the dark for a while. I’m unable to decide on a course of action w.r.t. (With regards to) programming. Android is a mess right now since I don’t know enough Java, and the emulator for the devices is way to slow on my computer. So while I’m learning javascript through CodeAcademy, I’m […]

So many things to do, so little time

I’ve not updated this blog in a few months now. I was actually surprised about that myself. Its been busy, to say the least. Toronto Free Net I’ve been volunteering at the Toronto Free Net and they’ve had me working on some shell scripts for system administration. It is a lot of fun, and I’m […]

Next steps

I would love to be able to get a running forward-testing system going for the pleasance project. This would involve downloading the latest financial information, then training pleasance on it, and applying the trained neural-net on the latest information, and making a prediction. Then do this all over again every week. Provide a running statistic […]

Essentials of Programming Languages, 3rd edition

A few weeks ago I was introduced to the book Essentials of Programming Languages, 3rd edition through Elance. A person wanted help with one of the exercises. I couldn’t help them in the time frame that they were willing to work with, but the book piqued my interest, and in the last 2 weeks I’ve […]

bulk-editing files

Over the last 3 days I have been trying to learn how to do bulk edits of files. I’ve decided to change the license of my programs to the Affero GPL v3, and wanted to change the notices in my files to reflect that. So I learned that in CL the only way to do […]