Category Archives: Programming

Setup Dropbox to sync on a schedule – Mac version

Currently I am living in a part of rural Virginia, where the only option for internet is ViaSat internet satellite.  The service has its ups and downs, but the worst part are the data caps, and they are cell phone low.  In fact the highest plan I can buy is 25GB of data transfer and that is about $140 per month.

One thing that I really miss is the ability to have my Dropbox synced at all times.  The data transfers can be high if I am putting videos and photos into my Dropbox.  Dropbox’s application currently allows you to throttle the bandwidth, but it’s either on or off…

ViaSat does offer something nice…  every morning from Midnight to 5AM they shut off the meters allowing unlimited usage.  I decided to leverage this and make Dropbox sync only during this free window.

Doing this on a MAC boils down to just two things.

1.  Create applications to launch and stop dropbox.
2.  Schedule a daily task to START Dropbox.app at 12AM and to STOP Dropbox.app at 5AM.

 

Create applications to launch and stop dropbox

On the Mac there is an awesome program called Automator that lets mere mortals create easy programs that can do various things.  I highly recommend looking into this capability.  It is really handy.  For this problem, we will use automator to both Launch and kill the dropbox app at the times we want.

 

Screen Shot 2015-05-19 at 09.50.52

1.1. First lets open Automator,  which is in the system’s Application folder.

 

Screen Shot 2015-05-19 at 09.52.33

1.2. Then click “New Document” to begin a new Automator document.

Select "Application"

1.3. Select “Application” to create a new application. (This first one will be setup to open the dropbox app)

 

Select Utilities on the left. Drag the "Start Application" task into the workflow pane on the right so it looks like this.

1.4. Select Utilities on the left.
1.5. Drag the “Start  Launch Application” task into the workflow pane on the right so it looks like this.

Save the new application into the system's Applications folder. I named it "Start Dropbox"

1.6. Save the new application into the system’s Applications folder.
I named it “Start Dropbox”

 

Perform a similar process to create another Automator app to "Quit Application." Make sure to assign the dropbox.app in the dropdown box, and also uncheck the save confirmation.

1.7. Perform a similar process to create another Automator app to “Quit Application.” Make sure to assign the dropbox.app in the dropdown box, and also uncheck the “ask to save changes” confirmation.

You should now have two automator apps that are in your applications folder.

1.8. You should now have two automator apps that are in your applications folder.

Next we will schedule these applications (a.k.a. workflows, scripts, etc.) to run automatically in iCal

 

Create a new Event in iCal on the first day you want this application to run. Setup to start at 00:00 i.e. midnight. Under alerts, setup a custom alert to open a file. Choose the Start dropbox app we made. Alert timing should be "At time of event" to make sure this fires off at the time we want.

2.1 Create a new Event in iCal on the first day you want this application to run.
2.2 Setup to start at 00:00 i.e. midnight.
2.3 Under alerts, setup a custom alert to open a file. Choose the Start dropbox app we made.
2.4 Alert timing should be “At time of event” to make sure this fires off at the time we want.

Screen Shot 2015-05-19 at 10.29.36

2.5 Set this event to repeat every day.

Screen Shot 2015-05-19 at 10.40.45

2.6 Repeat 2.1 through 2.5 to setup an event to “Quit Dropbox” at 5am (or whatever time you want)

You should end up with two new daily events on your calendar.

You should end up with two new daily events on your calendar.

 

One more tip. I put both of these events on a new "Automator" calendar, so I can uncheck it so it doesn't clutter up my iCal.

One more tip. I put both of these events on a new “Automator” calendar, so I can uncheck it so it doesn’t clutter up my iCal.

Codecademy Review

About

Codecademy is a computer programming teaching platform “Made in NYC” by a group of about 20 young entrepreneurs whose mission is to “… rethinking education from the ground up.”  The company was founded in 2011 and has since had about “24 million users who had completed over 100 million exercises.”  This is an impressive impact they are having.  I was watching Jessica McKellar’s talk  “A hands-on introduction to Python for beginning programmers” where she taught a 3 hour class to introduce people to Python programming.  During the class she supplemented her talk by having people do exercises on the Codecademy  platform.  I liked what I saw on the Pycon 2014 talk so I decided to run through the Python Track.  Here are some thoughts.

Coding platform

I really like the coding platform.  You get stepped through a programming “track” from the beginning which starts with the basics, progressively getting deeper into the subject and all along the way you are doing something you can relate to in the real world.  An example of this is that when you are learning how to make functions in Python, its done by creating functions to compute the cost of a Vacation.  By the end of that section you have created separate functions to calculate the cost of a rental car, hotel, and airfare.  The lesson shows you how to pass parameters to the function and even call multiple functions within the function.  It’s a very effective way to keep someone interested and grounded in reality, and not just teaching the syntax in an abstract way.

On the left side of the page you get  stepped through a section 1 lesson at a time.  The site tells you what you are about to learn, there is a code example similar to what you are expected to generate, and some step by step instructions on how to do it.  Then in the main body of the page is your code file.  There are strategically places code comments telling you what the existing code is doing and sometimes providing hints like “don’t forget to have a colon after your if statement.  Finally on the upper right side there is a window showing the output of your program.

Website

One of the really cool things is that as you go along through your efforts you earn badges similar to Khan academy. This is a fun addition and I always like getting surprised by a badge popping up after a certain point.  I think there is more that can be done on badges.  This seems to be a pretty nascent feature on Codecademy and should be further developed into something as robust as on Khan Academy.

Codecademy has recently done a complete website overhaul. I didn’t use it before, but the look and feel of the site is modern and fresh.  It is fast and I haven’t really run into any issues.  The site is written in Ruby on Rails and seems to run flawlessly.  As for the look and feel, I don’t think I would change a think.  Kudos.

Missing important languages and frameworks

There is only so much a small team can bite off and chew, but I think there are a couple glaring holes in the curricula at Codecademy.  Missing is anything related to mobile application development.  As this development represents half or more of the current computing worldwide it seems to be a big leave out.  I would like to see a Java track, which is arguably the most popular language and an Android development track which ,again, is one of the most popular mobile platforms.  In the same vein, I would suggest they add Swift programming and iOS framework development.

Also the most popular Python web framework has no track on Codecademy.  Django, which is powering sites like Pinterest, Instagram,

Another major part of programming is data storage and access.  SQL is a “coding language” that would be great to have on the site.  If a lesson track was put up on MySQL (or MariaDB preferably) the knowledge would be usable for pretty much any database backend someone ends up using, whether its MySQL, MSSQL, Oracle, IBMDB2, etc.  With these additions I am sure Codecademy would more than double the user base.

Missing social elements

Something that I find lacking is any social element on the website.  This seems to be missing everywhere on the site.  There are badges, so I would expect that some level of social interaction is in the cards, but even the most basic social interaction is missing.  Blog posts with no comments, no feedback area to suggest new features, no real place to post a bug, and the forums to have discussions with fellow students are hard to find. These items are all a big part of sites like Khan Academy and are a gaping hole in Codecademy right now.

Conclusion

This is a site with a huge potential to help countless millions of people to learn how to program.  The site and company are only a couple of years old at this point so I’m sure there is still a lot to do.   Computer programming and Web represent a huge opportunity for people.  The barrier to entry to creating your own web business is so low.  Codecademy helps to lower the barrier further by reducing the slope of the learning curve.  Programming gives us the language to speak to computers and use our imagination to create anything.  Codecademy is a good example of this as the founders, both from Columbia University, pretty much dropped everything and build a site that went from 0 users to millions in just a couple of years.

I will certainly be taking advantage of the resources, and hope to see Swift/iOS and Java/Android show up on the site sooner than later.