Our Command through simplicity blog
Why reviewing your own PRs is good
We’ve all been there - you’ve written what you think is perfect code, only to have your co-workers point out a glaring mistake. It’s not a great feeling, but it’s part of the job. However, there’s a way to minimize these instances and make the development process smoother for everyone involved: reviewing your own pull requests. I’ve found that when I review my own PRs in the GitHub UI, I approach the code with a fresh perspective. Issues that I missed while writing the code suddenly become o...
A collection of small JS utility functions
This is a compilation of nearly 300 compact JavaScript utility functions, designed to streamline common programming tasks and enhance code efficiency. If you don’t want to use libraries such as lodash or underscore (but I urge you to do) then this list might come in handy. It contains very simple functions such as isEmpty, isEven and isOdd to more specialized array and object manipulations, this collection offers a wide range of practical tools for JavaScript developers. These bite-sized fun...
Upgrading ShoutSMS from Rails 4 to Rails 7.1
Our ShoutSMS project has been cruising smoothly for the past 20 years. It has been running on Rails 4 without a glitch, but today I decided to upgrade it to the latest Rails version. The process went surprisingly smoothly. I have to admit, the ShoutSMS service isn’t too complex in features, and the number of third-party gems is quite limited. I started by creating a new Rails 7.1 application to use as a base. I then compared files and folders at a top level, especially remembering to copy t...
Released "Molly: Memory Game" as a very simple Simon clone
With the help from AI it’s now easier than every to build small, useful games. I just talked with my daughter the other day about the game “Simon” which she didn’t know. I told her it was a pretty simple game showing four colors which would light up in a sequence. You then have to remember the sequence and each time you will get one more color added to that sequence. I downloaded four clones from the App Store .. but all of them were either showing an ad after each play or was just too compl...
Revived Baby Art on the App Store
After not having updated Baby Art for years, it was removed from the Apple App Store. I initially created this app as a very simple drawing tool for the iPad, designed for my daughter when she was still a baby. The idea was simple: open the app and the baby can draw with their fingers in various colors and shapes. It automatically changes colors and shapes with each stroke and also randomly plays some baby sounds. Recently, I decided to revive it. Ten years ago, all the drawing handling had...
Projects page updated with screenshots
I tried to find some old screenshots of the projects and updated the projects page so it looks a bit better. I’m considering reviving some of the projects so they can get back running instead of just being the source code you’re able to see.
Building a simple Tic-Tac-Toe game
Yesterday, I found myself needing to pass some quality time with my daughter and we decided to play tic-tac-toe. To my surprise, there weren’t many options for a simple tic-tac-toe game that allowed two people to play remotely by just sharing a link. Sure you have lots of options if you download a game or want to go to a website and tap through 438 ads before playing, but I was looking for a straightforward page where you could click “new game,” and then easily invite someone to join by shari...
Released ConquerRSVP
We are thrilled to announce the launch of our latest application, ConquerRSVP, now available for MacOS users. This innovative application harnesses the power of Rapid Serial Visual Presentation (RSVP) technology to revolutionize the way you read. What is RSVP? RSVP is a cutting-edge reading technique designed to enhance speed and efficiency by presenting one word at a time at a user-controlled pace. This method minimizes eye movement and reduces the time spent on conventional reading, thus ...
Getting back into Rails 7 from Rails 2.3 😱
I’ve decided to revisit Rails after more than a decade of not using it. I have always loved it and created many applications when I was a Ruby on Rails consultant around 15 years ago. I have over 25 RoR applications I could try to migrate from an old Rails version to the new one. However, after a couple of quick attempts, I decided it’s not worth it because so much has changed, and it’s hard to determine the best migration path. Instead, I just set up a clean new Rails 7 app and transferred ...
RSVP? It's not just a polite request but it's a reading revolution
When most of us see the letters RSVP, our minds instinctively translate it to “Répondez s'il vous plaît,” a fancy way of asking us to confirm our attendance at a soirée. But in the world of cognitive neuroscience and advanced reading technologies, RSVP stands for something far more intriguing: Rapid Serial Visual Presentation. It’s about turbo-charging our reading speed. What is Rapid Serial Visual Presentation (RSVP)? Rapid Serial Visual Presentation is a digital reading format where words...
Simon Says game app: Classic memory fun for iPhone and iPad
Simon Says has been a beloved game for generations, captivating players with its simple yet challenging gameplay. In today’s digital world, this classic game has found new life in the form of mobile apps, bringing the excitement of Simon Says to our smartphones and tablets. The origins of Simon Says Simon Says originated as a children’s game, where one player takes on the role of “Simon” and issues commands to other players. The catch? Players should only follow commands that begin with “Si...
The importance of creativity in babies and toddlers through drawing
In the early stages of human development, creativity plays a pivotal role in shaping the way children perceive and interact with the world. Among numerous creative activities, drawing stands out as a fundamental practice that significantly benefits babies and toddlers. Here’s why encouraging your little ones to draw is essential for their growth: Enhancement of motor skills Drawing helps hone both fine and gross motor skills. As toddlers grasp crayons and scribble on paper, they refine thei...
Understanding rapid serial visual presentation (RSVP)
In our fast-paced digital world, where information overload is common and attention spans are dwindling, innovative methods to manage and process information are essential. One such method is rapid serial visual presentation, or RSVP. This technique has revolutionized how we consume text and offers numerous applications in various fields. What is rapid serial visual presentation (RSVP)? Rapid serial visual presentation (RSVP) is a method of displaying information (typically text) quickly an...
Prefer ObsoletedUser over NewUser for breaking changes
When updating a variable or type, it is a better practice to rename the old one to ObsoletedX and keep the active one as X. This approach enhances clarity, simplifies transitions and refactoring, minimizes errors, and improves overall code readability and maintainability. Adopting this naming convention is a small but powerful step towards writing cleaner, more maintainable code. In the ever-evolving landscape of software development, updates and refactoring are routine. However, the manner ...
Kids playing Simon: Fun and brain-boosting benefits
In the age of smartphones and digital distractions, finding activities that engage children in a fun yet educational way can be challenging. Enter Simon, an electronic game that has stood the test of time since its introduction in 1978. With its simple yet captivating design, Simon continues to be a beloved game among children. But beyond the fun and excitement, playing Simon offers several cognitive benefits for young minds. How Simon works Simon is deceptively simple. The game features fo...
The story of Simon, the original memory game
The original Simon Inventor Ralph Baer is best known for creating the first video game system, but his contributions extend much further. In 1975, Baer started an independent consulting business and began working with Marvin Glass & Associates in Chicago, a toy design firm responsible for some of the most successful American toys of the 20th century. Baer’s role was to develop electronic toys and games, and the most famous outcome of this collaboration was Simon. Inspiration strikes Na...
8 benefits of playing tic tac toe with preschoolers
Tic tac toe is a simple yet fun game that can be a great way to teach preschoolers many valuable skills. Here are 8 benefits of playing tic tac toe with preschoolers: Enhances Problem-Solving Skills Playing tic tac toe requires children to think critically and use problem-solving skills to strategize and win the game. Encourages Teamwork and Cooperation Tic tac toe can be played with a partner, which can encourage teamwork and cooperation among children. Enhances Fine Motor Skills Tic tac t...
A modern take on journaling
A diary is a sanctuary for your daily routines, thoughts, feelings, or experiences. Traditionally, it’s organized chronologically, capturing life’s moments as they happen. While some cherish the privacy of their secret diaries, others find joy in sharing their personal stories with the world. The most famous diary, “The Diary of Anne Frank,” transcended its private nature to become an iconic literary work. The evolution from diary to blog The internet revolutionized journaling, transforming...
What is an Online Diary?
History Online diaries have been around since at least 1994, starting a new way for people to share their thoughts and experiences. At first, these diaries were called online journals and created communities of people sharing their daily lives. Over time, the term ‘blog’ became the common name for these journals. ‘Weblog’ was the original term, later shortened to ‘blog.’ Evolution As technology advanced, private and secure online diaries emerged. These digital diaries replaced traditional ...
Understanding RSS: What it is and why it's useful
In the vast digital world where information flows at an overwhelming pace, staying updated with your favorite websites, blogs, and news sources can be a daunting task. This is where RSS comes into the picture. In this blog post, we will explore what RSS is, how it works, and why it remains a valuable tool for managing online content consumption. What is RSS? RSS stands for Really Simple Syndication or Rich Site Summary. It is a web feed format used to distribute frequently updated informati...
Tip: Include email in notification message when sending confirmation mails
If you are a web developer and needs to handle user registration the you probably are sending out confirmation emails to users to ensure they’ve entered a valid email. Lots of web sites (and apps) are showing a message saying “We’ve send you a confirmation mail. Please check your mailbox”. Tip of the day is this - make sure to include the actual email in that notification message. In case a user actually entered a wrong email he will notice immediately and doesn’t need to refresh his email ...
Tweak AppCode font aliasing on your mac
If you can’t use your beloved Monaco font in AppCode because it has gained weight and simply looks too bold, you might want to trim your anti-aliasing settings. Try running this in your terminal $ defaults write com.jetbrains.AppCode.plist AppleFontSmoothing -int 1 You might tweak it even more by using different values for -int 1 e.g. 0, 2 or 3. I’m not changing the system wide font smoothing setting, but only the one for AppCode.
Immediately flush IIS log for real time tail to avoid 60 second buffer delay
I wanted to tail my IIS log in realtime to avoid having to wait 60 seconds as is the default on IIS 7. I found out that I could run the command > netsh http flush logbuffer This is great but I wanted to do a tail so this short script does the trick for you (I assume you have cygwin installed if you’re on Windows) Run command every second in the background and flush output (the “Ok.” message) $ while true; do netsh http flush logbuffer > /dev/null; sleep 1; done & Then you’re ...
How to slice a PSD for use with iPhone & iPad
If you are designer doing iOS interfaces and want to help your developer, these guidelines are for you. Slice both a regular and Retina version. Retina files are postfixed with “@2x.png” (for “two times”) e.g. “account.png” vs “account@2x.png” Retina files must be placed in same folder as its non-retina brother Retina dimensions must be dividable with 2 e.g. 25x13 is not a valid retina dimension but 26x14 is fine All files should be of type PNG (24bit if necessary) Background files might be...
Resolving DNS issues on my ThinkPad running Windows 8
I just installed Windows 8 but had a hard time figuring out why not all sites were available. I quickly found out the DNS lookup failed. Since I had to uninstall my ThinkVantage WIFI manager before installing Windows 8 I assumed it could have something to do with an invalid configuration. I had to reset my TCP/IP stack before I got it to work which is done using C:\> netsh int ip reset reset.log followed by C:\> netsh winsock reset catalog It should do the trick – you might have...
Restore full backup of Redmine from Google Storage
Restore database from dump file # required settings DB_USERNAME='<redmine db username>' DB_PASSWORD='<redmine db password>' DB_NAME='<redmine db name>' REDMINE_ROOT='<full path to redmine root>' # e.g. /home/peter/rails/redmine.commanigy.com' BACKUP_ROOT='<full path to backup root>' # e.g. /home/peter/backups (will be created) RESTORE_FROM='<date in YYYYmmDD format>' # e.g. '20110201' for February 1, 2011 $ mysql -u $DB_USERNAME --password=$DB_PASSWORD $...
A quick Rails guide for designers
I almost always work with great designers when building Ruby on Rails web applications. These designers are capable of doing amazing HTML and CSS and are already able to navigate a RoR directory structure or able to do so after a quick intro. I’m not focusing on this basic structure convention in this guide but instead I will be taking designers a step further and actually enable them to add a little bit of functionality to views i.e. enabling them to control some logic in *.erb.html files lo...
A bash version of keep_releases known from Capistrano ruby scripts
Today I needed a clean up feature in my bash script similar to what’s known from Capistrano when using the “keep_releases” argument. I wasn’t able to find a simple version so I created it myself. Maybe others find it useful too so here goes releases_path=/data/sites/yoursite.com/releases # change this keep_releases=5 versions=`ls -xt $releases_path` releases=(${versions// / }) # check available number of versions in releases directory releases_count=${#releases[@]} if [ $releases_count -...
Finding Apache configuration file (httpd.conf) location
Just a quick tip for programmers working with Apache. Sometimes I’m asked where to find the Apache configuration file on a given server. Since it’s possible to configure this there is no “default location” so I usually do: $ ps -ef | grep apache which gives me a list like deploy@cmd01:/$ ps -ef | grep apache root 4053 1 0 06:26 ? 00:00:04 /usr/sbin/apache2 -k start www 5189 4053 0 11:00 ? 00:00:00 /usr/sbin/apache2 -k start www 5199 4053 0 11:00 ? ...
How to hide icon in your dock for any Mac application
Just got a beta of a Mac notifier for Podio and didn’t like it showed both an icon in my menubar and my dock (sometimes also referred to as the taskbar). If you want to avoid having any Mac application shown in your dock, it’s possible to patch its package by doing these simple steps Open Finder and browse to your application Right-click the file and select “Show Package Content” Browse to “Contents” and open “Info.plist” If you find an element called “Application is agent (UIElement)” ...
Use sensible defaults when building a web, mobile or desktop application
While working on migrating “gomore.dk”, a Danish ridesharing service, to Rails 3, I figured it would make sense to look into the existing database to figure out if I could add some sensible defaults when creating e.g. new rides. The site already contains a decent database so I figured it would be rather easy to measure which defaults to use. As an initial example, I would like to know how many seats were shared on each trip and therefore I did a simple query as shown below: From this, ...
An error occurred while validating. HRESULT = '8001010E'
Just a quick tip. While upgrading one of my projects from VS.NET 2008 to VS.NET 2010 I ran into a problem I wasn’t able to find a correct solution for it anywhere. While building my setup projects I got: An error occurred while validating. HRESULT = ‘8001010E’ Various posts suggested to remove all dependencies but in my case it was caused by an invalid reference to the framework. This is what I did to have it compile again: Right-click .vdproj Select “View” | “Launch Conditions” Right-c...
Universal builds for Mac App Store with Xcode
While working on Wallpapery, I had to do a universal build for both 32- and 64-bit. I expected I should simply set “Architectures” to “Standard (32/64-bit Universal)” but after approval in Mac App Store and user complaints I found out, I had missed a couple of steps. To build your product for both 32- and 64-bit architectures (aka i386 and x86_64) you have to explicitly unmark “Build Active Architecture Only” and filter list of “Valid Architectures” to only list “i386 x86_64” I wasn’t awa...
How to get display name from NSScreen
While working on Wallpapery I needed to get a given screens display name. There is no “displayName” method on NSScreen so I added a category to provide this functionality. Seems like others are looking for this too so I’m posting my code below. NSScreen+DisplayName.h #import <Cocoa/Cocoa.h> @interface NSScreen (DisplayName) - (NSString *)displayName; @end NSScreen+DisplayName.m #import <IOKit/graphics/IOGraphicsLib.h> #import "NSScreen+DisplayName.h" @implementation NSScr...
Send your weight from an iPhone through SMS
While working on lifestyleapps I have been asked a couple of times, if it would be possible to report your weight by sending an SMS from your phone. This is already possible and I have been using it from my iPhone 3G for a long time. The trick is to associate your Twitter account to your lifestyleapps account and set up your Twitter to accept SMS. In order to report your weight you need to follow @reporting which is the lifestyleapps Twitter account and by following this (and it will follow ...
How to send mass text messages from your own number
A couple of months ago we needed to make a service which would be able to send out sms text messages to a large number of people. The text message itself should come from a specific number so recipients would be able to reply back for more information. Another requirement was the ability to send a text message to a specific number and then trigger the mass sending to the configured recipients. The part sending out bulk sms is easy. A lot of companies have great, simple APIs to do this but t...
UIModalPresentationFormSheet width and height for an iPad in landscape mode
In a recent application I was doing, I was designing an interface to be shown as a modal form sheet using setModalPresentationStyle:UIModalPresentationFormSheet. I searched the Apple documentation to find the exact dimensions of this sheet but it isn’t documented. It only states “The width and height of the presented view are smaller than those of the screen and the view is centered on the screen. If the device is in a landscape orientation and the keyboard is visible, the position of the vi...
How to backup Redmine on Google Storage
If you would like to backup your Redmine database and files, you might to consider Google Storage as your backup location. It comes with a 100 GB free monthly usage. First, you need to sign up for a Google Storage account if you don’t have an account already. Once done, download and install GSUtil which is a command line tool, allowing you to manage buckets. Paste the following script into a file called “backup_redmine.sh” # required settings DB_USERNAME='<redmine db username>' DB_...
Using vi for your simple, day-to-day editing needs
My favorite editor isn’t vi, but I’m still using it at least a couple of times each day. It’s a short two character command, it’s always available and it starts fast. I have used it for decades and still, I only know these commands. I really don’t need to learn any others, contrary what some of my friends tell me. Need to know j = move down k = move up l = move right h = move left i = go into “insert” mode = go into “command-line” mode ESC = go out of current mode x = delete chara...
Lesson learned: Put limits on anything you provide for free
With our ShoutSMS service, we provide three free sms credits just for signing up. We do this to allow new users to try our service, without having to buy initial credits, just after they sign up. After initial launch, we almost immediately got people from India hitting our servers. They signed up, confirmed their number and tried to send overtaxed sms to various numbers. Because I had chosen an initial credit limit and a max cost limit on each sms, it was avoided. I know from my previous ...
Marketing tip: Include link to your app in newsletters
I have registered on a lot of sites and opt-in for their newsletter to be notified of updates. One thing bugging me is, when a site sends a great mail in their newsletter but doesn’t include a direct link to their web site. The mail is coming from their domain so it isn’t hard to guess but users are lazy! Since I’m registered on too many sites to visit regularly, I probably do want to visit a site, if it contains exiting updates but I have to admit, that without a direct link, I might not g...
Facebook CSS for will_paginate gem
Today I needed to add pagination to our Danish beta application for handling your accounting called Hurtigmoms (defunct). Since we’re developing in Rails it was a logically choice to use “will_paginate” to support pagination. Our prototype layout is using a Facebook header and so I wanted my pagination control to mimick their style. If you need something similar you might want to take a look at my CSS styles which are using the default class names used by will_paginate. .pagination { ...
Upgraded ShoutSMS from Rails 2.3.8 to Rails 3 in five minutes
Today I wanted to try how easy it would be to upgrade our existing ShoutSMS (pretty small) Rails application from 2.3.8 to latest Rails 3 release candidate (currently rc3). Without taking our test suite into consideration it took around five minutes with help from the official rails_upgrade[1] plugin. This is fast, yes, but considering the size of this app and possible pitfalls I am not looking forward to upgrade our larger projects. These are the basic steps to perform Install rails_upgra...
Tracking coffee intake with touchatag and Lifestyleapps
I have bought a touchatag RFID reader and a couple of touchatag RFID tags and was wondering how I could use these to track my daily intake in lifestyleapps. I noticed a Twitter application already has been developed which post a message from a configured account. Since lifestyleapps already integrate with Twitter it was a simple matter of associating a direct message and prefixing it with “h” or “having” to let lifestyleapps know you are reporting an intake. Many cups of coffee are consu...
Today, we have taken over development of ConquerCam
Today, we have taken over development of ConquerCam. ConquerCam is a low-priced (less than twenty bucks) webcam software package for Windows having quite a few cool features such as built-in web server, motion detection and scheduled uploads via FTP. ConquerCam was initially developed by me back in 1998 and at that time it was surely one of the very best in its category. Lacking time I stopped active development in 2003 but didn’t really give up on it since I continued to get feedback. Con...
Upgrading Rails Engines Project to Rails 2.3.2
Our lifestyleapps project (still in very early beta) was running Rails 2.2.2 with the Rails Engines plugin ten minutes ago. Today, Rails 2.3.2 was released so I decided to try if I could easily upgrade it and avoid using the Rails Engines plugin anymore. It was beautiful simple and took me less than ten minutes. First, I had to update our Apache Passenger module with a version supporting Rails 2.3 so I did a $ gem update passenger and then run the install to build our apache module $ pas...
Extend your shell toolbox with pbcopy
We are developing Rails applications on Mac OSX and a command which isn’t used enough in my opinion is “pbcopy”. This command will allow you to grab the standard input from a terminal and put it on the clipboard. I find myself using commands such as pwd | pbcopy all the time. This will grab my current working directory and make it available in my clipboard allowing me to easily paste it into another terminal or application. This avoids the need for you to grab your mouse to paste a simple li...
Our blog is live
You’ve found our blog “Command through simplicity”. This blog will post behind-the-scenes information about applications released by Commanigy. We have moved our beta applications Lifestyleapps and Observer to new and faster servers. These applications are almost updated daily so keep an eye on this blog or our Twitter account.