Blogging about commanigy

Jul 17, 2024

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...

Jul 09, 2024

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...

Jul 09, 2024

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...

May 27, 2024

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...

May 13, 2024

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...

May 08, 2024

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.

May 02, 2024

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...

Apr 29, 2024

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 ...

Apr 27, 2024

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 ...

Nov 13, 2021

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 ...

May 30, 2014

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 ...

Oct 27, 2013

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.

Aug 15, 2013

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 ...

Dec 16, 2012

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...

Sep 08, 2012

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...

May 28, 2012

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 $...

May 28, 2012

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...

Mar 31, 2012

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 -...

Jun 08, 2011

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 ? ...

Jan 06, 2011

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 ...

Nov 18, 2010

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...

Aug 18, 2010

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...

Apr 03, 2009

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...

Mar 16, 2009

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...

Mar 08, 2009

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.