Search This Blog

Saturday, December 10, 2016

WeightLifts bugs - Pickers and secondary muscle exercises

I discovered 2 bugs in WeightLifts:

1) the Muscle group pickers weren't being filled out when a user edits an exercise by going: "Workout" -> "Exercise" -> "Edit"

and 

2) Secondary exercises weren't being populated. 

I've got these both fixed, and will the updated should be out shortly. 


Sunday, November 13, 2016

WeightLifts Date Bug

I recently discovered a bug in WeightLifts that prevented entries made on single digit dates (so, November 7, November 8, etc.) from showing up properly in history and when exported. 

The cause of the bug was a change in the way dates were displayed after the update to Swift 3. 

I had set all dates to be formatted as "MMMM dd, yyyy" which meant that dates would show up as "November 07, 2016" for example. Note the "0" before the 7. After the update, however, Apple began removing the leading "0". Since I save all my date info as strings of text instead of date objects (I find it's easier to search for strings), when retrieving data (to populate previous workout info for example) the app was searching for "November 8, 2016" when the data was saved as "November 08, 2016" and thus not finding anything. 

I have corrected the bug, and will be releasing an update towards the end of the week (after some testing). This update will contain a little bit of code that will also go through and format all the date entries to the original double digit date style. For those of you with lots of entries, you may find slight delays when loading the app. I will remove this bit of code after 3 weeks, once everyone has updated. 

Sunday, September 18, 2016

WeightLifts Update and iOS 10

It was brought to my attention that the workouts section of WeightLifts had a glitch where after adding an exercise, leaving, then returning, the exercise would not be listed under the workout. 

I have fixed the glitch and tweaked the code a bit so that the app doesn't hang while it loads all the exercise #'s and days since last workout. I also added a button to refresh the workout goals instead of it happening automatically each time that screen is pulled up. I noticed the system starts to get pretty slow once you hit 200 exercises, so this update should fix that. 

However, my Xcode did not update automatically, so I was not able to release the update on time. I've downloaded Xcode 8 but now I need to convert all the code from Swift 2.0 to Swift 3.0, a process that seems to be taking a lot longer than it should. 

As soon as everything's updated and working properly I'll have the update of the app out on the app store. Thanks for you patience! 

Saturday, June 4, 2016

Coder Manual Week 2 (mid week)

This is just a brief update, as I'm not fully done week 2 yet. We've covered a lot about HTML and Style Sheets and I've just began touching on using JavaScript. I've been looking forward to this because JavaScript is actual programming, not just cosmetics, which is what HTML and CSS are mainly about. So far in the javascript bit, we've just covered the usual programming stuff: loops, conditionals, and a bit of syntax. I'm really looking forward to learning how to get javascript to interact with HTML content though.
I've also started the first assignment. The assignments are basically just working through the free content provided by Codecademy. This was a little disappointing (it would have been MUCH more disappointing if I had paid full price for the course), but Codecademy is actually pretty good. The topics in Codecademy are broken up into bite-sized pieces, where they introduce a concept (which I had already covered in Code Manual) and they get you to put it into practice in the little built-in compiler. Once you've entered the information they want you to (such as creating a small webpage with headings, colors, fonts, etc.) you hit "save and submit" and it'll tell you if you did it right. You do also get to see a preview of the changes, so it's not like you're flying blind.

Sunday, May 22, 2016

Coder Manual Week 1

So I completed Week 1 of the Coder Manual Course. 

In Part 1, we covered setting up the different systems we needed. The first was Cloud 9 (C9.com), an online IDE where we can run Ruby (among many other languages actually). Second, he had us download Sublime Text ( SublimeText.com) which is basically a programmer-focused text editor. It'll format what you type depending on the language to make it easier to read and follow. Alternatively, he said you could use JSFiddle (JSFiddle.net), or CodePen (CodePen.io).

In Part II, he took us through how cloud 9 could be used to set up a blog. The main takeaway from this part was that there is lots of code available online that we can borrow to make ours look nice. The tutor took us to a website where we copied a bit of publicly available code into one of the files of our blog. With that in there, we were able to call upon different formats and styles that the maker of the code had already made, saving us the trouble of having to design it all ourselves. So for instance, we made 3 buttons (new post, edit post, delete post) and now we were able to enter a few lines of code that enabled those three buttons take on different appearances such as a textured green, yellow, or red. We also learned how to add entries to our blog, delete entries, and list the entries in a nice looking table complete with the date they were posted. Yes this is all stuff you can do MUCH quicker with a website like Blogger.com, but this is how you learn and what if you wanted to make a blog that can do things Blogger can't? Also, if you're probably wondering why I'm using blogger if I just learned how to make my own blog. Simple: web hosting. Blogger will host my blog, whereas I'm on my own or I'll have to pay to have my custom one properly hosted. Also, I'm still a n00b at this.

In Part III, we learned about HTML and websites. Using the Sublime Text editor, the tutor walked us through the different ways of displaying some of the most basic content on a website. We covered:

  • formatting text as:
    • paragraphs
    • headers,
    • unordered lists,
    • ordered lists,
    • nested lists,
  • inserting images,
  • putting text in tables,
  • creating forms with:
    • Text Fields,
    • Password Fields,
    • Checkboxes,
    • Radio Buttons,
    • Dropdown Selectors, and
    • Text Areas
Among a few other things. Lastly, he showed us how to bring a fancy, freely available existing template, into Cloud9 so we can edit it for ourselves. So far, he hasn't really taught us anything that you can't do much quicker using existing software, if your goal is to just make a blog or webpage. However, I'm quite pleased with what I'm learning as I feel it will help me understand much better how websites work, and programming in general. Also, this blog entry was typed almost entirely in the HTML tab of Bloggers New Post form. I formatted the tables and hyperlinks myself using code as opposed to using Blogger's autoformats. :P

Saturday, May 14, 2016

CoderManual.com Online Bootcamp on Sale for 92% off.

Having looked at job postings for software developers, it seems like most employers want you to know MANY languages at once. I saw very few posts asking for 1 or 2 languages, and some of them asked for languages I've never even heard of. 

While going out and buying books on a number of language is one way of going about learning them, Boot Camps seemed more appealing. Until I saw the price tag. Fortunately, I was alerted to one bootcamp that was having sale: An extensive 12 week online Program to Learn to Code for $39.00 (originally $499). Heck, that's the cost of a programming book, so I signed up. 

The company hosting the bootcamp is CoderManual, and the membership is being sold through StackSocial, See it here.

It's a fairly young bootcamp, having been started in January 2015, so not many reviews are available yet. The general consensus is "so far so good", it seems. 

Since I've just started, I'll try and post updates about it as I go. 

Wednesday, March 30, 2016

TimeSince

My second app, TimeSince, is now available on the App Store! It's free, so please check it out and leave a review!

Wednesday, March 2, 2016

Code Sample: Sorting an Array of Dates as Strings

My WeightLifts app used a LOT of date comparisons to make everything show up in the right order. Sorting an array of Date strings seemed to be something everyone knew how to do except me. It was only after a LOT of searching and trial and error, did I figure it out. 

To save you all the headache, here is a code sample showing how to do it. Copy and paste this into a playground and it should work.  This code is written in Swift 2.0 by the way.

import UIKit

func convertStringDateToNSDateAndSort(unsortedDateArray:[String]) -> [String] {
    
    //Strings cannot be sorted by date, so we need an array of NSDate Objects instead
    var dateObjectArray: [NSDate] = []
    
    //create another array to hold the sorted dates as strings
    var sortedDateArray:[String] = []
    
    
    //create an NSDateFormatter that will convert a string to an NSDate
    let dateStringFormatter = NSDateFormatter()
    
    //you can set the format to your preference, I have chosen the MMMM dd, yyyy format
    dateStringFormatter.dateFormat = "MMMM dd, yyyy"

    //now, go through each item in the unsortedDateArray and convert it to an NSDate
    for DateString in unsortedDateArray {
        let dateAsNSDate = dateStringFormatter.dateFromString(DateString)
        dateObjectArray.append(dateAsNSDate!)
        
    }
    
    //by this point you will have an unsorted array of NSDate objects. These CAN be sorted, and sorted without creating another array (i.e, sorted in place). The code below basically says "compare each item in dateObjectArray in pairs. If the first item is more recent than the second, move it to the front of the array.
    
    dateObjectArray.sortInPlace{(item1, item2) -> Bool in
        return item1.timeIntervalSinceNow > item2.timeIntervalSinceNow
    }
    
    //by this point, you will have an array of sorted NSDate objects. Create another NSDateFormatter to change them BACK into Strings.
    let dateFormat = NSDateFormatter()
    dateFormat.setLocalizedDateFormatFromTemplate("yyyyMMMMdd")
    
    //now go through each object in the dateObjectArray, convert them to strings, and append them to the sortedDateArray
    for dateItem in dateObjectArray {
        let dateItemToAppend = dateFormat.stringFromDate(dateItem)
        sortedDateArray.append(dateItemToAppend)
        
    }
    
    //now return the sortedDateArray
    return sortedDateArray
}

var ArrayContainingUnsortedDatesAsStrings = ["April 1, 2009", "February 5, 2013", "December 19, 2006"]

var ArrayOfSortedDatesAsStrings = convertStringDateToNSDateAndSort(ArrayContainingUnsortedDatesAsStrings)

print(ArrayOfSortedDatesAsStrings)

What you'll end up with is:

["February 05, 2013", "April 01, 2009", "December 19, 2006"]

Monday, February 29, 2016

WeightLifts Free Trial Ends

So the free trial of WeightLifts has come to an end, from here on it will be $0.99. 

If you've downloaded the app, please please please rate and review it! I'll be adding a button in the next release that will take you directly to iTunes to do so, but for now you can go here: 


https://itunes.apple.com/us/app/weightlifts-weight-lifting/id1076167536?mt=8#


Thank you in advance! 

Saturday, February 27, 2016

TimeSince App

I just completed my second app: TimeSince

This is a simple app that will allow you to create trackers for incidents or events. Think of it like those signs you see in workplaces that say "No incident for: " and then a number of days. When an event occurs, simply tap the large red button, you can choose the time and date (if different from that very instant), add a note if need be, and save it. The app will then start counting the number of seconds, minutes, hours, days, weeks, months, and so on since the most recent incident. It will also display the average time between incidents. 

To add an incident to a different tracker, simply tap the information disclosure (the "i") button before tapping the large red button. 

To rearrange the trackers, tap the "Edit" button in the top left corner of the screen. 

To delete a tracker, swipe left on the tracker and choose "Delete" 

Tapping a row will take you to a list of all the incidents, along with their time, date, and notes. Swiping left on any row will let you delete it. 

And that's it! It is a simple app, so it will be available for free on the app store, just as soon as apple releases Xcode 7.3 final. 

It turns out that apps made and compiled in beta versions cannot be uploaded to the app store. 

Saturday, January 23, 2016

WeightLifts Free for a Limited Time!

WeightLifts is now free on the App Store for a limited time! Please give it a try, rate and review!