Tuesday, January 17, 2012

Meal Timer


Meal Timer is my first Windows Phone 7 application (requires Mango update for WP7). There are a number of apps in the WP7 Marketplace that are ‘kitchen timers’ and allow you to set reminders or alarms for  particular time, but Meal Timer is unique (as far as I know) in that it allows multiple timers to be set so they all end at the same time. This means the application itself ensures your meat, vegetables, sauces and other meal components are all ready *at the same time*. Additionally, unlike most other kitchen timers that assume you are cooking immediately, Meal you can schedule the meal to be ready at a particular time, and Meal Timer will set alarms so everything is ready at that time (or you can start cooking right away if you want).

Best of all Meal Timer is *technically* free. There is a trial version and a paid version, but the two versions are exactly the same. We only ask that you purchase the application if you find it useful and continue to use it, but there is no requirement to do so.

Download-EN-Small

So, how does it work ?

First, download the application from the Marketplace. Then open the application from your application list (or pin it to your start menu for a beautiful tile showing a tasty homemade hamburger, and open it via the tile).

When you first open Meal Timer you will see the main ‘panorama screen’ which will be set which will be scrolled to the ‘components’ page and looks like this;

EmptyComponentsPage

To start, you need to add some items to cook. Do this by pressing the button at the bottom of the screen marked with a + symbol. This will bring up the ‘Add Component’ window.

 

 

 

 

 

 

 

 

 

EmtpyAddItemDialog

Click in the ‘Name’ field and type the name of something you’re going to cook, i.e 'Chicken’. Note, you don’t have to add the items in any particular order, Meal Timer will sort the items into the correct cooking order based on time, later when we tell it we’re ready to start or schedule cooking.

 

 

 

 

 

 

 

 

 

AddItemDialogItemNameOnly

With the item name entered, you now need to enter the cooking time. First, you need to go to the cooking time box. The easiest way to do this is to press the enter button on the on-screen keyboard. Otherwise, you can tap in the visible portion of the Cooking Time field (you can flick up on any part of the dark background area behind the text fields to scroll them up so it’s easier to see and tap on the Cooking Time field). Alternatively, you can press the back button on the phone itself to close the keyboard, then tap in the Cooking Time field, but pressing enter is the easiest thing to do.

 

 

 

 

 

 

 

 

 

EnterCookingTime

Once you’re in the cooking time field, simple enter either a number of whole minutes, or a number of hours and minutes separated by a colon (:) character. For example, 75 and 1:15 both refer to 1 hour and fifteen minutes. When you’ve entered the time, either press enter on the on-screen keyboard or the button at the bottom of the screen marked with a plus to add this item and start entering another. If you’ve entered all the items you want to enter (or if this is the last item you intend to enter), you can press the button at the bottom of the screen marked with a tick (check mark). If you’ve changed your mind about entering the item currently shown on screen, press the back button on your phone to return to the main screen.

 

 

 

 

 

 

 

 

 

ComponentsListScreenshot

Back on the main screen the components list will now show all the items you’ve entered.

If you want to change the time you entered on one of these items, click on the red area representing the item. If you want to remove an item from the list entirely, click on the trash can icon on the right hand side of the item you want to delete.

You can scroll the list of meal components up and down by swiping with your finger.

To start or schedule cooking, press the button at the bottom of the screen marked with an arrow head (like the play button on a DVD player). This will bring up the Start Cooking dialog.

 

 

 

 

 

 

 

 

StartCookingScreenshot

If you want to start cooking right away, click the Start Now check box to place a check mark in it. Alternatively leave the Start Now check box unchecked, select the time you want your meal to be ready at below it. Note, you can use the settings screen to change the default meal time. When you’ve made your choice, press the button at the bottom of the screen marked with a tick (check mark). If you’re not ready yet or have changed your mind, press the back button on your phone. When you do start or schedule cooking you will be returned to the main page and the meal components you entered earlier will move across to the timers page. You can move between the components and timers pages by swiping left or right on screen when the main page is shown.

 

 

 

 

 

 

 

 

TimersScreenshot

The various components of the meal will be sorted by cooking time so the item that is going to take the longest to cook is started first, and so on. An ‘alarm’ will be set on your phone for the time each item needs to start cooking, and another alarm will be set for when all the items are ready. These alarms will go off even if you close the Meal Timer application.

If you leave Meal Timer running, the components on the timers page will turn read when they need to start cooking (as well as the alarm going off) and the system will start counting down the time left for that item. Each timer shows you the scheduled start time, the total cooking time for that item, and the time remaining (counting down while the timer is running).

Timers that are grey indicate they have not started yet. When a timer completes, it turns black for about a second and then disappears.

You can scroll the list of timers up and down by swiping with your finger.

 

 

 

 

 

 

And that’ about it ! There is a setting screen, which you can access from the main page by pressing the three little dots near the bottom right and then choosing ‘settings’ from the menu that pops up. The settings screen allows you to set the sound used for the alarm and the default meal time, as well as delete any data the application has saved, and there are also shortcuts to rate/review and buy the application in the WP7 Marketplace.

So, what if you want to schedule multiple courses for a single meal ? Easy, just perform the steps above once for each course and choose a different ‘Meal Ready at Time’ for each course on the Start Cooking screen. All the timers will mix in together on the timers page, but all the items for each course (scheduled together) will be ready at the same time. Simple !

If you have any suggestions, problems or queries please contact me via yort@yortondotnet.com.


Thursday, June 30, 2011

DataViews and Filter Expressions


Yesterday I helped a colleague with a problem involving a DataView that would not find any rows when given a valid filter expression that should have returned rows. It took a little while to figure the problem out, so I thought I’d post the solution in case anyone else is stuck with the same issue.

In our case we had a DataTable (as part of a DataSet) that contained rows. Using the Debug Visualiser for the DataSet we could view the rows and see the data we expected. We had a column called BranchId and we wanted to find rows with a specific value in this column. If we wrote our own loop (we’re working in .Net 2.0 so no LINQ etc.) to iterate all the rows, request the value of the BranchId column and check it against the value we were searching for (17 in the first case) we found the row no problem. However, if we created a DataView with a filter expression of “[BranchId] = 17” now rows were returned.

The usual culprit here is ‘RowState’, where you must tell the DataView whether to include added rows, deleted rows, or to look at the modified or original versions of the rows. However, our code was correctly telling the DataView which row states to check, and the row state for the rows in question matched, so this was not the problem. Interestingly if we called AcceptChanges on the DataSet then the view would work fine, but we couldn’t do this because we needed to retain the current row state value for later in our algorithm, and AcceptChanges resets the row state.

In the end it turned out the problem was caused by a failure to call ‘EndEdit’ on the row. Specifically, the BranchId value for these rows had been programmatically set via code earlier in the application and EndEdit hadn’t been called on the row afterwards. This meant the proposed value was 17, but the current and original values were‘unset’ (note, not actually null as requesting the original value threw an exception saying the value didn’t exist, even though nulls were allowed). Calling EndEdit on the row moved the value from ‘Proposed’ to the current value without affecting the RowState, and then the DataView filter worked fine.

Of course this all makes perfect sense when you think about it, and of course you should call EndEdit to commit changes to a DataRow when you’ve finished making them. The confusing issue in this case was that ONLY DataView was checking the ‘current’ value of the field. Everything else (the Debugger Visualiser and other debug tools, and any code we wrote to check the column value without specifying which value to check) was checking the proposed value by default. This made it appear like the DataView or filter expression was at fault, and there was no help, guidance or clear hint that the issue was caused by the same field having two different values simultaneously. Also, since most of our edits occur through controls like the DataGrid, EndEdit usually gets called for us by the control. It was only because we had (unusually) set the DataSet value programmatically that we needed to manually call EndEdit ourselves. Interestingly, there also doesn’t appear to be anyway to tell the DataView to check the proposed value rather than the current (committed) value.

So, moral of the story (and a good thing to remember anyway), always call EndEdit on your DataRows after you’ve programmatically made changes to them (and you want to keep/commit those changes in memory).


Friday, June 24, 2011

Windows 8 for software developers: the Longhorn dream reborn?

I really wish there would be a public anouncement from Microsoft themselves clarifying a few things, but at least this puts some of the recent rumours/leaks in a positive light (rather than all the drama and doomsaying that has been going on);

Windows 8 for software developers: the Longhorn dream reborn?

Tuesday, June 07, 2011

Why Apple Enthusiasts Are Wrong About Windows 8 - Techland - TIME.com

Why Apple Enthusiasts Are Wrong About Windows 8 - Techland - TIME.com

Will Microsoft Own the Web (Again) ?

 

Contentious title, I know, but that’s just to get you here. If you’re reading this, it worked.

With the recent news about Windows 8 from Microsoft, like many, I’ve been pondering their future. Since I work for a software development company heavily invested in Microsoft tools and technologies, my future is tied to theirs so this makes sense. It’s hard to know what Microsoft’s strategy is, or if they have one at all. Sometimes it looks like they’re doing new cool things (WP7), although uptake by the market doesn’t always follow. Other times it looks like the right hand isn’t talking to the left, or the whole company is in panic mode. Much has been written about how Microsoft is behind it’s competitors, or no longer relevant, how Ballmer is (allegedly) driving it under and so on. There have also been the debacles over the question of the future Silverlight and the use of the admittedly idiotic term “Native HTML” all of which have caused laughter from some sections of the industry. All this may or may not be true at present, but I’m wondering if there isn’t a secret plan that’s being missed by most. I wonder if perhaps those laughing should stop and think about this a little bit longer.

Microsoft could be said to have owned the web at one stage, Netscape/Mozilla created the first browser but Microsoft came out with IE and basically crushed them. Let’s not forget that Microsoft is generally pretty good at playing catch-up even when it’s later to the game, it is good and experienced at being the underdog. We can argue about which product was actually better, or whether the business practices employed by Microsoft were fair and so on, but in the end they had far more of the browser market than any other. Of course, while IE is still widely used today, other browsers are growing faster and have stolen a significant portion of that market share.

Combine that with the up take in portable devices, mostly Smartphones and tablets like the iPhone, iPad, and Android phones and tablets, and Microsoft seems to be fighting a losing battle. Are Windows 8 and IE 9 part of a plan to turn that around ? That might sound ridiculous, obviously Microsoft are going to release new products, obviously they’re supposed to be better than what came before, and obviously Microsoft hopes those products will save them. What I’m asking is are Windows 8 and IE 9 the first steps in a plan to create the web client platform of choice ?

Hardware acceleration in the browser (IE9), a (supposedly, depending on your personal taste) cool and striking new UI for Windows based on the already much lauded WP7 interface, and an OS designed to run across a variety of platforms and form factors ? HTML5 and JScript as the development tools of choice for Windows 8? What if “Native HTML" is supposed to mean “Native and HTML” or something similar ? Taking HTML5 and JScript seriously opens up a lot of applications to running on Windows 8 and being sold through the new Windows 8 app store that wouldn’t have been if it was native only. If Windows 8 actually provided additional capabilities for web applications, things that couldn’t be done on other platforms, then web developers (at least some of them) would get excited about that. All of a sudden we have a class of (good/excellent) web applications that either only work, or work best on Windows. What if the plan is to produce the killer client OS for using the web ?

You may be terrified by this concept, after all, many see the web as a place free of dominance by a single client platform and want it to remain that way. Or you might just hate the idea of Microsoft being the winner here. You may scoff. Who knows if Microsoft can actually pull this off (no doubt many would argue they can’t)… but what if Microsoft turned Windows into the iOS of the web ? What if you could get web and internet experiences like no other, but only on the Windows platform  and that platform ran on your smartphone, your tablet, your laptop, your TV ?

What if having the fastest or best standards support or whatever in a browser doesn’t matter because the web is no longer separate to your OS, constrained inside the browser ? Is this Microsoft’s answer to ChromeOS, albeit with a different view… instead of the browser being the operating system shell, the OS is a bigger, better browser ? What if the point here is not to kill non-web applications or move away from them, but to actually enable web based applications to compete with non-web applications on performance, beauty, offline support and general user experience ? What if Microsoft made Windows the coolest platform for consuming the web and internet (on any device) as Apple made the iPhone coolest smartphone ?

Ok, so Microsoft have been building the internet and the web into Windows in various ways for a while, this isn’t exactly a new concept. Security is also a problem that gets bigger the more you integrate the internet and web to the OS. Microsoft may or may not pull it off, and if they do it’s likely to be Windows 10 before we see the full fruits of this (possible) plan (if any). Just for a moment though, throw out any bias you might have and consider what the world would be like if Microsoft managed this feat. What would the world be like if no one wanted to access the web unless they were using Windows ? What if Microsoft owned the web again ?


Friday, June 03, 2011

Mobile Opportunity: Windows 8: The Beginning of the End of Windows

Check out the following blog post by Michael Mace on Windows 8 and the future of Microsoft. It is an an excellent article with an interesting and well thought out analysis of both the possible success and failure Windows 8 represents for Microsoft. There's even a warning for traditional web companies, the likes of Google and Facebook, should everything come together in Microsoft's favour.

Mobile Opportunity: Windows 8: The Beginning of the End of Windows