After a weekend break, which was not a real break since I continued to work on filtering issues for half a day on Saturday, it is now the day to complete the two remaining filter bugs. I wish I could have been done with these issues but this is such an important part of the app that I want to make sure it is all working perfectly. The last two problems as visual and relate to the location of the tick marks and labels on the Telerik RangeSliders customized for the Windows Store app. After continued struggles this weekend, I am beginning to think that maybe I am trying to force the control to do something it was no intended to do. From my experience I have done this same thing with other controls in the past so I know the request is not totally unusual. I may just have to get the tick marks and labels close enough as the working filters are the most important part and that is all working as it should be. I am going to leave that alone for today and move on.
So the big task for day is working with Windows Store app settings. So the first place to start is the generic Windows Store guidelines of Settings. Once that was read then I found probably the best quick start guide so far on how to use the new Windows 8.1 Settings service. I had to look up the ToogleSwitch class as I had not used that before and it is highly customizable. I had to look up how to set the default switch value as the IsOn property was a bit odd for me as I just assumed it I needed a slight refresher on how to define get/set accessors since the break away from C# must have caused some memory loss. I also needed to look up the best way to compare strings as well. This is kind of getting depressing that I did not remember those two things. The hardest part was figuring out how to know when the Settings flyout was closed. There is a BackClick which was easy to handle in the SettingsFlyout class.
Then in testing I found out that you can use Escape key while the Settings is up so I need to handle that case. I searched for a solution and found a sample app that did just this which really proved helpful as that just was not obvious at all. In a way it makes sense that to know when the Escape key was pressed that a global listener was needed but defining it on "Window.Current.CoreWindow" was not my first guess, second guess or ay guess for that matter. The sample app should how to have multiple pages of settings that depend on each other, which I did not need, but learning how to handle key events was a new lesson. It also required learning about Virtual Keys to check for the specific Escape key in the handler.
I then found an odd issue when the Escape was used on the keyboard and the Settings flyout went away I had a nice white outline around by AppBarToggleButton. Naturally I tried the obvious thing to do, which was remove the focus. My intuition let me down as that immediately caused an exception and when I looked up the Focus State documentation that was in the first line that doing so would cause an exception. As a work around I set focus to the main window and that fixed my problem from a keyboard stand point.
The next issue to figure out is how to know when my toggle switches have been changed in the Settings flyout. It is time again to use Data Bindings so I go back to that quick start guide. This requires a single INotifyPropertyChange interface by adding a PropertyChangedEventHandler and a very simple PropertyChangedEventArgs with the name of the property that was changed. That was not a big deal as I had dealt with those before.
The last problem was figuring out how to save my Settings once I had the flyout working correctly. That took a bit of searching but yet another great quick start article helped me understand how to solve that problem by using Windows.Storage.ApplicationData.Current.LocalSettings. After a short break in Windows Store app coding, it makes the documentation seem even better as I have had two new things I needed to do and I found the documentation to solve both quickly.
I am pretty happy that it only took me one short day to add custom preferences for my Windows Store app.
Does good design really make a difference? Implementing software often has no relation to life outside work, where chaos seems to be the rule rather than the exception. You may not be able to control life, but let's not practice chaos when developing software.
Monday, January 6, 2014
Friday, January 3, 2014
From concept to reality in 6 weeks - part 29
I will have to work on the filter changes again today as I was not able to finish them all yesterday. The big problem I encountered yesterday was that I switched the Telerik RangeSlider from "PointerReleased" to "PointerMoved". Doesn't sound like a big deal as it actually does what I want but I receive tons of extra events when the pointer in fact has not moved so now my #1 priority to figure out why and prevent that bad behavior.
Turns out that the event arguments I get in this callback is a standard Windows event called PointerRoutedEventArgs. So the real issue is that the pointer did in fact move by the slider thumb value did not changed. Time to read up on Telerik events and see if there is a custom event where I can get this information. I found absolutely no information on Telerik custom events so that must mean they always use the standard Microsoft Windows Store events. Time to read up on the pointers quick start guide as I am hoping to find a gem in there to help me get over the hump. That was interesting reading but did not help me as I am getting every pointer change, so I have to recognize within my code when the RangeSlider thumb has changed. That is pretty sad as I should be able to use the built in INotifyPropertyChange interface but if the RangeSlider does not implement it then listening to property changes for selection start and end will do me no good. In protest I went into my Telerik account to contact customer support and then realized the cheap license we got to save money did not come with support after the initial 30 days, so much for that. I am moving on as I have a solution not an elegant one I was hoping for.
There is nothing like taking time to test thoroughly all of the options. The last two days I have been testing all of the filtering from every imaginable angle. This is something I did not get a chance to do when in hurry up get everything working quickly mode. I must admit it feels really good to know with confidence that the filtering code is working exactly as it should be. It would not have been possible without the fixed TestData that I created previously with all know values. That was time well worth spent.
Turns out that the event arguments I get in this callback is a standard Windows event called PointerRoutedEventArgs. So the real issue is that the pointer did in fact move by the slider thumb value did not changed. Time to read up on Telerik events and see if there is a custom event where I can get this information. I found absolutely no information on Telerik custom events so that must mean they always use the standard Microsoft Windows Store events. Time to read up on the pointers quick start guide as I am hoping to find a gem in there to help me get over the hump. That was interesting reading but did not help me as I am getting every pointer change, so I have to recognize within my code when the RangeSlider thumb has changed. That is pretty sad as I should be able to use the built in INotifyPropertyChange interface but if the RangeSlider does not implement it then listening to property changes for selection start and end will do me no good. In protest I went into my Telerik account to contact customer support and then realized the cheap license we got to save money did not come with support after the initial 30 days, so much for that. I am moving on as I have a solution not an elegant one I was hoping for.
There is nothing like taking time to test thoroughly all of the options. The last two days I have been testing all of the filtering from every imaginable angle. This is something I did not get a chance to do when in hurry up get everything working quickly mode. I must admit it feels really good to know with confidence that the filtering code is working exactly as it should be. It would not have been possible without the fixed TestData that I created previously with all know values. That was time well worth spent.
From concept to reality in 6 weeks - part 28
It is time to resume working on some of the features that I did not have time to complete for the conference that are needed in the final product. The last time I looked at this code it was 12 days ago so I need to try to remember where I was. Thankfully I recorded all of the outstanding issues in Kanbanery so I just need to resume where I left off. I worked on a couple of other projects in the meantime so I have to settle back into this Windows Store stuff as it requires a paradigm shift.
To start off the day, I picked a couple of the simple tasks so I can warm up to working in VSE and the Windows environment. It is funny how quickly your brain reverts to comfortable things like Command-C/Command-V on my Mac versus Ctrl-C/Ctrl-V on Windows. For my first issue I had to bring up Xcode and look at the Objective-C iOS implementation so that is a crazy way to start the day by then switching to VSE and C#. I survived the simple tasks so now onto the hard ones I ignored because of time pressures...
I decided to tackle all of the Telerik slider related bugs today as those seem to be the most important parts as that is where the Windows Store app deviates the most from the iPad app. Everything I ever wanted to know is in the Telerik RangeSlider documentation as the problems I am seeing are all related to configuration issues and not issues in the Telerik control itself, mostly related to snapping and tick mark locations. I did not actually write any of that code as I farmed that out to someone else when I got in a time crunch so now it is time to learn how it was built using reusable components and style resources. This is going to be a good lesson to learn as I skipped that part of building a Windows Store app.
To start off the day, I picked a couple of the simple tasks so I can warm up to working in VSE and the Windows environment. It is funny how quickly your brain reverts to comfortable things like Command-C/Command-V on my Mac versus Ctrl-C/Ctrl-V on Windows. For my first issue I had to bring up Xcode and look at the Objective-C iOS implementation so that is a crazy way to start the day by then switching to VSE and C#. I survived the simple tasks so now onto the hard ones I ignored because of time pressures...
I decided to tackle all of the Telerik slider related bugs today as those seem to be the most important parts as that is where the Windows Store app deviates the most from the iPad app. Everything I ever wanted to know is in the Telerik RangeSlider documentation as the problems I am seeing are all related to configuration issues and not issues in the Telerik control itself, mostly related to snapping and tick mark locations. I did not actually write any of that code as I farmed that out to someone else when I got in a time crunch so now it is time to learn how it was built using reusable components and style resources. This is going to be a good lesson to learn as I skipped that part of building a Windows Store app.
Tuesday, December 24, 2013
My son's latest artwork
My oldest son has decided to use Facebook to marketing his art work. He sent out a message to find out how many people would want a $10 portrait for the Christmas holidays. This is like right out of the Lean Startup MVP and he could care less about that book - somehow that was intuitive to him as the right thing to do - how interesting. From his Facebook responses he now has one $100 cow painting and a $200 unicorn painting commissioned. He has one more he must do for an undisclosed amount where he was told to do a painting and he would get well paid for it. The unicorn is going to travel to California so his social network has paid off quickly. My absolute favorite is the harpist and you have to see these in person to really appreciate them.
Saturday, December 21, 2013
From concept to reality in 6 weeks - part 27
The hardest part of the day today is figuring out what music to listen to. Not really, now I have to watch my time wisely as I have run out of billable time on this project but I need to do more manual testing on the device being sued at the conference to make sure it is working in every way without any problems. It will not take tons of time but it has to be done whether I get paid for it or not.
The first thing I had to do this morning was recap the whole project in executive summary form to give to the customer in our final meeting on Monday. I actually enjoy doing that as it reminds me how much I accomplished the last month but I constantly have to remind myself of the target audience. Not too much technical detail but enough that a valid summary can be given from the details. Kanbanery has some nice reporting features that helped me some, but it also helped me since I constantly use it to record what is needed to be done and I move the tasks when I am done. Any customer interaction is recorded as comments, which this time also helped me with a couple of summary items.
As I was testing the final changes, it suddenly came to me that what I really need to do is create a perfect test file that has an example of every single value so I can double check on more time that everything is perfect. Now that I can load data from files that is just so easy to do. Time to get serious about my test fixtures. It must have been the time pressure of this whole project that we made not think clearly.
In order to get the list of all airports in North Carolina and Virginia, I tried several sources on web and then just found the airport lists on Wikipedia and used them. The list of IATA NC airport codes and VA airport codes was used to locate all of the commercial primary airports. I then used Flight Stats to look up the complete information exception altitude which I had to use Mrs. Google on each of the airports. Most of the time the airport code would work in the search, as in "RDU altitude" and if not then I would just search for the city and use the altitude I saw in any search results match so I did not have to click on any link in the search results. If all else fails then I go to U.S. Climate Data site which always has what I need. Then I got into a roll by using a search string of "zip code near ... airport" within maps.google.com and then entered the closest city name, state name and zip code into the Maps Easy web site to get the latitude and longitude. I then traversed the USA from Bangor, Maine to Los Angeles, California by picking major cities along the way. I then picked half way points between these 15 cities by approximating the halt way GPS coordinate. This simple GPS path of 31 points helped me find a couple more problems in the code, so it was all worth it even though it took me several hours to do it.
After a full day of work with numerous breaks, but still a full day, I am finally DONE.
The first thing I had to do this morning was recap the whole project in executive summary form to give to the customer in our final meeting on Monday. I actually enjoy doing that as it reminds me how much I accomplished the last month but I constantly have to remind myself of the target audience. Not too much technical detail but enough that a valid summary can be given from the details. Kanbanery has some nice reporting features that helped me some, but it also helped me since I constantly use it to record what is needed to be done and I move the tasks when I am done. Any customer interaction is recorded as comments, which this time also helped me with a couple of summary items.
As I was testing the final changes, it suddenly came to me that what I really need to do is create a perfect test file that has an example of every single value so I can double check on more time that everything is perfect. Now that I can load data from files that is just so easy to do. Time to get serious about my test fixtures. It must have been the time pressure of this whole project that we made not think clearly.
In order to get the list of all airports in North Carolina and Virginia, I tried several sources on web and then just found the airport lists on Wikipedia and used them. The list of IATA NC airport codes and VA airport codes was used to locate all of the commercial primary airports. I then used Flight Stats to look up the complete information exception altitude which I had to use Mrs. Google on each of the airports. Most of the time the airport code would work in the search, as in "RDU altitude" and if not then I would just search for the city and use the altitude I saw in any search results match so I did not have to click on any link in the search results. If all else fails then I go to U.S. Climate Data site which always has what I need. Then I got into a roll by using a search string of "zip code near ... airport" within maps.google.com and then entered the closest city name, state name and zip code into the Maps Easy web site to get the latitude and longitude. I then traversed the USA from Bangor, Maine to Los Angeles, California by picking major cities along the way. I then picked half way points between these 15 cities by approximating the halt way GPS coordinate. This simple GPS path of 31 points helped me find a couple more problems in the code, so it was all worth it even though it took me several hours to do it.
After a full day of work with numerous breaks, but still a full day, I am finally DONE.
Friday, December 20, 2013
From concept to reality in 6 weeks - part 26
So here we are at the final day of work on what needs to be working for the conference. I ended the afternoon yesterday listening to Robin Trower and it was so pleasant that I am going to resume where I left off on Spotify this morning instead of trying to discover new music. The goal for today is to look at a couple of performance problems loading the data from the secure server and fixing the remaining two problems. It sounds easy but finding performance problems can sometimes be a big challenge. Of course the #1 task is to test, test and do more testing as it has to be super stable with no new issues introduced today when with anything I fix. As I work on this app, I constantly keep in mind that this is going to be shown to thousands of people and would I be happy to be there in person showing it?
After more than a month of working on this app, it still never ceases to amaze me when I find yet another super useful MSDN documentation page. This morning I was considering adding a hyperlink to my UI and so I used Ms. Google to search for "windows store xaml controls" and found this useful list of controls with thumbnails of what they look like with code used to create them. Then they have a list of all of the controls by function. Those pages are just so useful to someone starting out. Wait, that was me a month ago. I guess I am a little slow. It kinds of reminds me of the Adobe Flex Showcase. Some days I think there is definitely nothing new under the sun as the employees at Microsoft just learned from other tools what works well and then borrow the ideas and improved on them. I don't know which came first Adobe Flex MXML or Windows XAML but Apple Storyboards are the exact same idea and I know they came later than MXML or XAML.
When I was looking thru the controls list, I see they support tooltips. I still find this really odd on a touch device. I know from using Windows 8 that touch and hold results in a difference action from touching but that is not obvious since that gesture does not exist on Apple devices. Maybe it should be it does not.
Before going to too crazy, I wanted to go back to my existing Kanbanery stories and add references to the MSDN documentation on how I would solve the problems, just in case someone else picks up those tasks in the future. Even if it is me, then many weeks from now I am not going to remember what in the world I was doing.
The list of available components is pretty large and it was easy getting distracting looking at all of the examples to see what I could have used but did not for the UI I created, but I found what I need as it is called a HyperlinkButton. I think I am finally getting the hang of this. I then wanted to style the hyperlink as the default color just does not work with my themed colors. I could not find the styles off the main HyperlinkButton class documentation, but I found it right away in Ms. Google as I searched for "hyperlinkbutton styles xaml c#". I define the two brushes and then I run the app expecting easy success. I get the strangest error message I have not seen before:
It is time to do all kinds of manual testing to make sure the latest app is super stable. That is more important to me than adding any new features at this late in the game. I need a really stable app to deliver on Monday morning at my 9am meeting and I cannot work during the weekend, so bug free is very important.
At the same time I have to find out where the time is being spent processing data from the server as the time spent processing is pretty amazing when load the same data from local files. I must say that over the many years I have been doing this I have not found great benefit in using a performance analyzer as they are not to understand and take time to figure out what is being presented in the output report. I used to run analyzers all of the time in OpenGL development as they helped me. So, I decided to give it a try in VSE. They certainly make it so easy to run as I just select "Performance and Diagnostics" from the DEBUG menu. Download 6 hours worth of data and then stop the app and up comes the report. I really like the presentation as I can click on the column chart or select a region and the details below update to show the "Hot Elements" where most of the time was spent. The first time I selected "XAML UI Responsiveness" but the second time I selected "CPU Sampling". The later one was easy to explain as most of the CPU is spent in the mapping engine. Although those reports looked really good and had great interactivity, they did not help me with my problem at hand at all. And since I like to torture myself, I ran the amusing "Energy Consumption" report as well. The nice donut chart said it all "The session consumed approximately 139.09 mW-h of battery charge in 1.03 min. This rate of usage will drain a fully charged standard battery in approximately 5.23 hrs." - nice. The nice thing about this report is that I see "Wi-Fi Network" in the table with his blue bars of data that represent each of my downloads. I double click on them and I see another set of "Data Transfer" blocks and tool tips that tell me about each one as far as how much data transferred in each request and uploaded data which must be the request and acknowledgement responses. If I use my touch screen then I just tap on one of the blue blocks and the tool tip displays. Very nice - it does help me see one thing - the network is not the problem and the size of data is not a problem either. At least that helps me some. I look back at the donut chart and see that 59% of time was spent in CPU, 40% of the time was spent rendering data to the display and 2% was spent on network traffic. I went back into the "CPU Sampling" report and start poking around to see if any glaring problems came out. Although interesting and good looking, I need to add console log statements in my code and figure out what the delay is between getting the server data and starting the next download as that is my real problem.
In order to find the problem in my code I searched for way to get elapsed time and found the StopWatch class and added a Start/Increment/End calls and reran the app. Loading the data form the server took a total of around 44 seconds but reading the same data from files took a little over 1 second. To read 24 hours worth of data (around 65,000 data points with 18 values per point) took 20 seconds. Then I got brave and went back to loading 24 hours of data from the server and that took 4 minutes. I sent an email to the customer with this information. Now blinding fast but not horrible and the times are predictable and do not really vary much at all.
It took way longer than I expected to get the last issues resolved, but finally I am done and the only thing left to do is to have one final meeting and do the official hand off to the customer, but that is for another day.
After more than a month of working on this app, it still never ceases to amaze me when I find yet another super useful MSDN documentation page. This morning I was considering adding a hyperlink to my UI and so I used Ms. Google to search for "windows store xaml controls" and found this useful list of controls with thumbnails of what they look like with code used to create them. Then they have a list of all of the controls by function. Those pages are just so useful to someone starting out. Wait, that was me a month ago. I guess I am a little slow. It kinds of reminds me of the Adobe Flex Showcase. Some days I think there is definitely nothing new under the sun as the employees at Microsoft just learned from other tools what works well and then borrow the ideas and improved on them. I don't know which came first Adobe Flex MXML or Windows XAML but Apple Storyboards are the exact same idea and I know they came later than MXML or XAML.
When I was looking thru the controls list, I see they support tooltips. I still find this really odd on a touch device. I know from using Windows 8 that touch and hold results in a difference action from touching but that is not obvious since that gesture does not exist on Apple devices. Maybe it should be it does not.
Before going to too crazy, I wanted to go back to my existing Kanbanery stories and add references to the MSDN documentation on how I would solve the problems, just in case someone else picks up those tasks in the future. Even if it is me, then many weeks from now I am not going to remember what in the world I was doing.
The list of available components is pretty large and it was easy getting distracting looking at all of the examples to see what I could have used but did not for the UI I created, but I found what I need as it is called a HyperlinkButton. I think I am finally getting the hang of this. I then wanted to style the hyperlink as the default color just does not work with my themed colors. I could not find the styles off the main HyperlinkButton class documentation, but I found it right away in Ms. Google as I searched for "hyperlinkbutton styles xaml c#". I define the two brushes and then I run the app expecting easy success. I get the strangest error message I have not seen before:
WinRT information: Failed to create a "Windows.UI.Xaml.Media.Brush" from the text ''. [Line: 185 Position: 46]I looked in my resources XAML file and then at Git to see what I changed as that just did not make sense. I see the problem immediately as I started adding Foreground color to my Hyperlink button and had Foreground="". Sure enough I look at my MainPage.xaml file and on line 185 I found that half baked code. I compile the code and re-run it and it looks exactly as I intended it to. A little bit more code and I am done with that task.
It is time to do all kinds of manual testing to make sure the latest app is super stable. That is more important to me than adding any new features at this late in the game. I need a really stable app to deliver on Monday morning at my 9am meeting and I cannot work during the weekend, so bug free is very important.
At the same time I have to find out where the time is being spent processing data from the server as the time spent processing is pretty amazing when load the same data from local files. I must say that over the many years I have been doing this I have not found great benefit in using a performance analyzer as they are not to understand and take time to figure out what is being presented in the output report. I used to run analyzers all of the time in OpenGL development as they helped me. So, I decided to give it a try in VSE. They certainly make it so easy to run as I just select "Performance and Diagnostics" from the DEBUG menu. Download 6 hours worth of data and then stop the app and up comes the report. I really like the presentation as I can click on the column chart or select a region and the details below update to show the "Hot Elements" where most of the time was spent. The first time I selected "XAML UI Responsiveness" but the second time I selected "CPU Sampling". The later one was easy to explain as most of the CPU is spent in the mapping engine. Although those reports looked really good and had great interactivity, they did not help me with my problem at hand at all. And since I like to torture myself, I ran the amusing "Energy Consumption" report as well. The nice donut chart said it all "The session consumed approximately 139.09 mW-h of battery charge in 1.03 min. This rate of usage will drain a fully charged standard battery in approximately 5.23 hrs." - nice. The nice thing about this report is that I see "Wi-Fi Network" in the table with his blue bars of data that represent each of my downloads. I double click on them and I see another set of "Data Transfer" blocks and tool tips that tell me about each one as far as how much data transferred in each request and uploaded data which must be the request and acknowledgement responses. If I use my touch screen then I just tap on one of the blue blocks and the tool tip displays. Very nice - it does help me see one thing - the network is not the problem and the size of data is not a problem either. At least that helps me some. I look back at the donut chart and see that 59% of time was spent in CPU, 40% of the time was spent rendering data to the display and 2% was spent on network traffic. I went back into the "CPU Sampling" report and start poking around to see if any glaring problems came out. Although interesting and good looking, I need to add console log statements in my code and figure out what the delay is between getting the server data and starting the next download as that is my real problem.
In order to find the problem in my code I searched for way to get elapsed time and found the StopWatch class and added a Start/Increment/End calls and reran the app. Loading the data form the server took a total of around 44 seconds but reading the same data from files took a little over 1 second. To read 24 hours worth of data (around 65,000 data points with 18 values per point) took 20 seconds. Then I got brave and went back to loading 24 hours of data from the server and that took 4 minutes. I sent an email to the customer with this information. Now blinding fast but not horrible and the times are predictable and do not really vary much at all.
It took way longer than I expected to get the last issues resolved, but finally I am done and the only thing left to do is to have one final meeting and do the official hand off to the customer, but that is for another day.
Thursday, December 19, 2013
From concept to reality in 6 weeks - part 25
Just when I thought I was done and could relax, I woke up today knowing I have to finish in a couple more days. I have today and tomorrow and then a weekend to be done. The good news is just as I expected the fix from my new found friend was waiting for me when I woke up. He had found the problem of the crash in his mapping engine code and had fixed it.
Now all I have to do it using his new DLLs and work my way thru all of the small issues I need to finish off. This morning I tried to poke around in Spotify to figure out what kind of music I felt like listening to and finally I arrived at Kirk Fletcher. He is the guitarist for The Fabulous Thunderbirds, so it is going to be a bluesy day today. That should help me a lot.
This morning I learned a new trick by calling "System.Diagnostics.Debug.Assert(false)" in my LINQ try/catch blocks I can see the stack trace when errors occur in the debug console. I have really de-generated in the past month as look at that crazy language I am speaking. I need to hurry up and finish this stuff to get back to what I really need to do and love doing and that it UX directed tasks. Enough of this programming stuff as it is not helping me!
I have several problems I must fix, so back to working on each one of these until I fix them all. Unless of course I need to go to sleep tonight and then I will leave some for tomorrow.
As I was marching down thru the issues, I actually found one in my own testing. When I was in hurry up mode, I could not figure out how to customize the Telerik Date/Time control to remove the header as I wanted my own text outside the control. I finally took some time and learned how to do that and it was pretty easy once I understood a bit more about component development in Windows 8 XAML from the Telerik documentation on the Date/Time control.
The next big lesson is that when creating a Grid you need to define the RowDefinitions and the ColumnDefinitions if you want the Grid to fill the remaining space. I am not sure why I thought that was the default but this is like the 5th time I have tried using a Grid and got frustrated when it did not work. I went back and the documentation exists but it is hard to find anything useful in there. I had to go back to the Quick Start Guide for Layouts as it was in there under the Auto and Star sizing. What a crazy name so that should prove another special keyword was needed instead of using a "*". On the other hand I really like the "2*" syntax to make a column two times wider than another - that is nice.
Now it is definitely to do a little complaining about VSE. I am sure there is a way to customize everything but the default action to increase/decrease the font size in the current editor is driving me crazy. The VSE default is for a two finger pinch to decrease the font size and the two finger extend increases the font size. That is not a gesture I deal with my my Mac so something I do changes the font size all of the time. It took me a while to figure it out - like a month!
The big lesson for the day is to always use a Grid since it is easier to adjust it that to use a StackPanel and then switch to a Grid. OK - always is a bit harsh but I don't know how many times in the last month I have started with a StackPanel because it was easy and then later on to switch it to a Grid. The real rule is if you have more than one row then create Grid.RowDefinitions and if you have more than one column then create Grid.ColumnDefinitions. Then all is well. Another very good rule is never try to nest StackPanel in a Grid or a Grid in a StackPanel as that just does not work without a lot of effort. This line in the documentation says it all:
Now all I have to do it using his new DLLs and work my way thru all of the small issues I need to finish off. This morning I tried to poke around in Spotify to figure out what kind of music I felt like listening to and finally I arrived at Kirk Fletcher. He is the guitarist for The Fabulous Thunderbirds, so it is going to be a bluesy day today. That should help me a lot.
This morning I learned a new trick by calling "System.Diagnostics.Debug.Assert(false)" in my LINQ try/catch blocks I can see the stack trace when errors occur in the debug console. I have really de-generated in the past month as look at that crazy language I am speaking. I need to hurry up and finish this stuff to get back to what I really need to do and love doing and that it UX directed tasks. Enough of this programming stuff as it is not helping me!
I have several problems I must fix, so back to working on each one of these until I fix them all. Unless of course I need to go to sleep tonight and then I will leave some for tomorrow.
As I was marching down thru the issues, I actually found one in my own testing. When I was in hurry up mode, I could not figure out how to customize the Telerik Date/Time control to remove the header as I wanted my own text outside the control. I finally took some time and learned how to do that and it was pretty easy once I understood a bit more about component development in Windows 8 XAML from the Telerik documentation on the Date/Time control.
The next big lesson is that when creating a Grid you need to define the RowDefinitions and the ColumnDefinitions if you want the Grid to fill the remaining space. I am not sure why I thought that was the default but this is like the 5th time I have tried using a Grid and got frustrated when it did not work. I went back and the documentation exists but it is hard to find anything useful in there. I had to go back to the Quick Start Guide for Layouts as it was in there under the Auto and Star sizing. What a crazy name so that should prove another special keyword was needed instead of using a "*". On the other hand I really like the "2*" syntax to make a column two times wider than another - that is nice.
Now it is definitely to do a little complaining about VSE. I am sure there is a way to customize everything but the default action to increase/decrease the font size in the current editor is driving me crazy. The VSE default is for a two finger pinch to decrease the font size and the two finger extend increases the font size. That is not a gesture I deal with my my Mac so something I do changes the font size all of the time. It took me a while to figure it out - like a month!
The big lesson for the day is to always use a Grid since it is easier to adjust it that to use a StackPanel and then switch to a Grid. OK - always is a bit harsh but I don't know how many times in the last month I have started with a StackPanel because it was easy and then later on to switch it to a Grid. The real rule is if you have more than one row then create Grid.RowDefinitions and if you have more than one column then create Grid.ColumnDefinitions. Then all is well. Another very good rule is never try to nest StackPanel in a Grid or a Grid in a StackPanel as that just does not work without a lot of effort. This line in the documentation says it all:
By default, a Grid contains one row and one column.The final task of the day is to learn how to style the Telerik date/time controls as the default blue background color is clashing with my default colors. Should be easy to fix since Telerik really has superb documentation on their control styles. Then of course I wanted to change the standard XAML slider colors as the purple is just a bit strange with the theme colors I am using. That took a bit more work to find the documentation and then it just show how great the Telerik documentation is as there are not illustrated screenshots that show the SolidColorBrush colors and where they apply to the XAML slider. I finally figured it out but it was a bit of hit and miss programming. Since this took too much effort I don't want to forget this technique:
To end the day I how to figure out how to combine two different dates into a single date. One had the date and the other had the time. Not an ideal situation but it was not all that difficult to merge the two into a single date. Enough for today as tomorrow will be my final day of work on this project it appears at the moment.
Subscribe to:
Posts (Atom)