JttCotA Part V.V (Can you even do that?): Reflection

Posted by on Dec 13, 2013 in DGST101 Blogs |

How the hell did the Ancient Romans deal with decimals? Anyway, trying to jump into a programming language like I have is like playing a Bethesda game, but your only resource is a web forum. You have no idea where to go or what to do, you have a vague idea of where you want to go, and on your way to that objective you are just bombarded with overwhelming amounts of bullshit that are available for insane people so they can do insane things. The first time I played a Bethesda game (Fallout 3) I ran around picking up every fork, knife, plate, basket, and food item I found because there wasn’t anything to tell me what was important and what was something I would never need to touch. This is pretty much what is going on with me and this app. I do what the internet tells me to do and every time I try to type something into VisualStudio I’m bombarded with 2,000 properties of some function (seriously what are those called) that all have different little icons next to them and they scare me to death. I feel about this proud of myself right now. I think that the #1 place I went wrong was in rushing. Literally the first thing that the amazing Bob Tabor tells you in the very first lesson on Windows Phone app development is DO NOT RUSH and I think I did that a little a lot. I have been struggling with whether or not my main issue was trying to make an app first thing, but honestly if I’d put a lot of time into this then I think I would have been fine. The way that most of the tutorials work is to basically walk you through creating a sample app, but I didn’t bother to actually follow along and create those apps; I basically had them on while I worked on my own app in the background. This whole program is more of something that should be done over a long period of time rather than trying to get an app written, perfected, submitted, and published in two weeks. Like, a month. I also kind of screwed the pooch because I chose to make a flashlight. I should have realized that there was a reason I didn’t like any of the flashlights that I’d tried on the marketplace; it really sucks to try to use it. Especially for somebody that has never really coded in C# and has hazy at best memories of C++. Microsoft literally lets you drag a web browser from a toolbox onto the designer and presto you have a fully functional web browser;...

Read More

JttCotA Part V.V (Can you even do that?): Reflection

Posted by on Dec 13, 2013 in DGST101 Blogs |

How the hell did the Ancient Romans deal with decimals? Anyway, trying to jump into a programming language like I have is like playing a Bethesda game, but your only resource is a web forum. You have no idea where to go or what to do, you have a vague idea of where you want to go, and on your way to that objective you are just bombarded with overwhelming amounts of bullshit that are available for insane people so they can do insane things. The first time I played a Bethesda game (Fallout 3) I ran around picking up every fork, knife, plate, basket, and food item I found because there wasn’t anything to tell me what was important and what was something I would never need to touch. This is pretty much what is going on with me and this app. I do what the internet tells me to do and every time I try to type something into VisualStudio I’m bombarded with 2,000 properties of some function (seriously what are those called) that all have different little icons next to them and they scare me to death. I feel about this proud of myself right now. I think that the #1 place I went wrong was in rushing. Literally the first thing that the amazing Bob Tabor tells you in the very first lesson on Windows Phone app development is DO NOT RUSH and I think I did that a little a lot. I have been struggling with whether or not my main issue was trying to make an app first thing, but honestly if I’d put a lot of time into this then I think I would have been fine. The way that most of the tutorials work is to basically walk you through creating a sample app, but I didn’t bother to actually follow along and create those apps; I basically had them on while I worked on my own app in the background. This whole program is more of something that should be done over a long period of time rather than trying to get an app written, perfected, submitted, and published in two weeks. Like, a month. I also kind of screwed the pooch because I chose to make a flashlight. I should have realized that there was a reason I didn’t like any of the flashlights that I’d tried on the marketplace; it really sucks to try to use it. Especially for somebody that has never really coded in C# and has hazy at best memories of C++. Microsoft literally lets you drag a web browser from a toolbox onto the designer and presto you have a fully functional web browser;...

Read More

JttCotA: Part V: Western Promises

Posted by on Dec 13, 2013 in DGST101 Blogs |

I have had a very exciting moment in the development of my app. It’s on the level of the first time Oppenheimer ran the debugging software on his prototype nuke and it gave a little explosion, or the time that Steven Spielberg first hit the power button for Bruce and it bit half of his arm off before crashing. I deployed the app to my phone, and it ran (which its done before), and when I clicked the little abortive square that indicates that a button should be there, my flashlight turned on (which it hasn’t done before). Then it crashed with that System.Reflection.TargetInvocationException error. Oh. Poo. But hey, progress! At this point I’m not watching any more getting started videos, largely because I’m trying to figure out specific issues rather than major, fundamental paradigms. I’m not sure that that’s a good place for me to be right now, but what the hell do I know. I’ve still not figured out how to deal with my major TargetInvocationException, so I’ve been trying to kind of work around it. I’ve been dabbling in getting the settings page to be integrated with the main page, but that’s not going to great. When you click on the button while running the app, it seems to just switch to a totally blank page. There might be an issue with the way that I’m trying to get the page with the button; maybe a bad path? Or a bad… method? I don’t think that’s what those are called. I think it might be a path issue because it’s as relative a path as I use for the icons, and they’re not rendering on the phone either (but they are showing up in the designer window of VS. Typical). Speaking of icons, have I ever told you how terrible I am at design? GIMP and PhotoShop are my least favorite things in the world, and yet here I am being forced to use them. Below is the current work I have done on the icon: It’s supposed to be a little cartoon dude with torso and head, except his head is a sun with rays (flashlight on) or no rays (flashlight off). Right now I’m having trouble figuring out how to line the rays up well with the head. Seriously, don’t look at the picture it’s awful. The tile would use the same image (Perhaps just the sun on the small tile). The settings icon would just be, you know, a settings gear. kill… me… As part of my work on the settings page, I’ve also been doing some preliminary work on the code for implementing the Day/Night modes of the UI elements. My idea...

Read More

JttCotA: Part IV – The Code

Posted by on Dec 12, 2013 in DGST101 Blogs |

So I just added the code from the guide on making a flashlight to my page. I am getting permissions errors when I try to run it, but as of right now the code seems to be working fine. Well, it doesn’t throw any errors. I’m going to be writing a blog post here on the code that’s on that guide, and explain what is going on to the best of my ability. This is what we’ll be studying today, kids. I should first mention that all of this code is going in a button event handler. That means that I’m putting this into a section of code that is activated when you click on a button. In this specific case, my button basically takes up the entire screen. It’s nice. CameraSensorLocation camLocation = CameraSensorLocation.Back; It is apparently important to determine which camera I’m trying to use. This is essentially creating a variable named camLocation. This variable will only hold data on which camera I’m using, in this case I am telling it that camLocation should be the back camera. IReadOnlyList(object) CameraModes; This creates a list called CameraModes. This list can be filled with anything considered an object, and can’t be changed once the app is running. In my code, object is actually in “<>” instead of “()” but HTML doesn’t like that very much. CameraModes = AudioVideoCaptureDevice.GetSupportedPropertyValues(camLocation, KnownCameraAudioVideoProperties.VideoTorchMode); This takes that list we made in the last line, CameraModes, and fills it with all of the options regarding the LED light connected to the back camera on the phone. From what I saw, this is just on, off and auto. However, there might not be any LED light, in which case we need to check for that. if (CameraModes.ToList().Contains((UInt32)VideoTorchMode.On)) { This marks the beginning of a section of code that will only run if there is an option in that CameraModes list we made earlier to turn on an LED light. AudioVideoCaptureDevice flashLight; This creates an AudioVideoCaptureDevice object that I named flashLight, which I guess is a piece of code that essentially represents the entire camera. flashLight = await AudioVideoCaptureDevice.OpenAsync(camLocation, AudioVideoCaptureDevice.GetAvailableCaptureResolutions(camLocation).First()); I don’t know what this does. The guide says it “initialize[s] [the camera object] by fetching the Available Camera at the specified Camera Sensor Location.” I know that, because I used the await command, I actually had to change my button from a public to an async, uh, thing. I know that there is a video on this stuff here but I’m not going to watch it just now. flashLight.SetProperty(KnownCameraAudioVideoProperties.VideoTorchMode, VideoTorchMode.On); So this is the good stuff. After performing all of those steps, I finally get to turn the flashlight on. This code takes the flashLight object...

Read More

JttCotA: Part III – Setbacks and decionmaking

Posted by on Dec 10, 2013 in DGST101 Blogs |

So Windows Phone 7 doesn’t have an API for the back LED light, so if that means what I think what it means, I won’t be able to do anything with it. That’s pretty frustrating. I’ve always wanted to support as many devices and people as I possibly could, but it’s becoming apparent that that isn’t going to happen. There are a lot of hacks that people were able to develop back in the day, like repeatedly calling the function to turn on the Focus Assist Light, but honestly I’m not feeling particularly confident in my C# capabilities enough to do something like that. I think that I’m just going to have to support only Windows Phone 8, which is a whole new problem, because right now my app is being developed to be compatible with Windows Phone 7. Hilariously, I have no idea what this means. So what I’ve decided to do is just delete the project and start over. Good thing I haven’t really even done anything. I’ve figured out that I’m going to need a total of three files for this app: a XAML file for the main screen, a XAML file for the settings, and a C# file for the code. Right now I’m trying to work on the layout, which is awkward because there isn’t any code yet. For example, one of the issues that I’m having is trying to figure out the Opacity settings for my Application bar right now. The declaration for the bar asks for an Opacity setting, but I’m not sure if I can fill that in with a Variable, which would need to be taken from the C# code. I’m hoping that I can, but at the same time not having C# code to work with is not particularly helpful. I’m also wanting to my my emblem today. It’s supposed to just be a simple white outline of a sun, with a circle and little triangles radiating out from it. However, getting triangles that line up with the circle is something that is worrying me. I’m not even sure how to draw things like boxes in GIMP, so right now I’m working on it in MS Paint. I mean really, though, what could be better. I’m still struggling with coding quite a bit, though I think that, now that I’ve figured out the button controls, I should be ok. I think that the Settings page might give me a little bit of an issue, but I’m still not sure how all of that sort of thing works just yet. I considered having the settings just be a page you could swipe to instead of something that you needed to...

Read More

7 reasons your internet habits are terrible

Posted by on Dec 6, 2013 in DGST101 Blogs |

All anybody needs to capture you attention is puppies. via amyoops Timmy just wants to look at cool pictures of his favorite Pokemon, Latias. And you ruin it. Your Fanfiction should never be seen by another human being. Much less all of them. Nobody needs another Skip Bayless. Stop talking about sports. via reddit The music you make is worse than anything Guns ‘N Roses ever made. Ever. via reddit You are constantly being manipulated by your computer screen into liking things more, simply because it’s so big. You just want to read lists all the...

Read More

JttCotA: Part II – Oh God What

Posted by on Dec 1, 2013 in DGST101 Blogs |

If there is anything wrong with modern society, it’s that we don’t confuse the shit out of our kids. Back in the days when the creators of my childhood cartoons were growing up, apparently dads would just throw their children into lakes in order to teach them how to swim. On the surface, this seems like a really stupid idea: children are just going to drown a ton and you’re not getting any better swimmers than if you just taught the kid how to swim one step at a time. But I have now thrown myself into the deadly Lake of C#/XAML (apparently pronounced ZAM-ull), and oh my God do I wish that I had been given some sort of instinct to float to the top. I suppose that the main issue here is that I’m working with two different languages that I have never worked with before. So far what I have done is found a new video series, called Windows Phone 8 Development for Absolute Beginners, that is laid out much more interestingly and is able to better catch my attention. At times, it helps me understand the fundamentals that are going on, but I feel that the Absolute Beginners association is rather misleading. It would appear, though this doesn’t seem to be stated anywhere, that you should definitely have completed the C# Fundamentals: Development for Absolute Beginners array of videos before beginning. However, it would appear that XAML is covered in the scope of the series, as the videos seem to go rather in depth explaining what to do with XAML and what exactly it is. I’m not sure if I need to start the C# videos, though I’m thinking that that will be a good idea. There’s also a series for Windows Phone 7, which is rather frustrating; I am trying to target my app to be useful for both WP7 and 8, but I’m not sure if I should be coding using only WP7 things. I don’t even know if there are things that are exclusive to WP7. I am pretty lost here, and I guess the biggest issue I’m having is not knowing where to start. This is what I am looking at after finally creating my app project file. I don’t understand any of it. I’ve installed the SDK for Windows Phone, and so far it seems to be working relatively alright. It takes up a HUGE amount of space, however, because there are essentially 3 or 4 panes that it is displaying horizontally; I really wish right about now that I had an extra monitor or two. The software itself isn’t all that confusing, it’s just understanding what things to assign...

Read More

Journey to the Center of the App

Posted by on Nov 29, 2013 in DGST101 Blogs |

Today marks the starting point of my week-ish long journey into app development. I’ll be writing an app for Windows Phone 8, largely because I have one, there aren’t many apps for it and I’ve heard that developing for it is very easy. I’ve decided that it would be a good idea to use Microsoft’s provided app dev Getting Started Guide, with supplemental help from their Channel 9 “Jump Start” videos. These videos are roughly an hour long each, which is pretty terrifying. I may also end up needing their Jump Start videos for C# as well, if that ends up being something that is significantly different than C++. I’m currently in the process of installing the SDK, which is so far very nice-looking, and watching the first Jump Start video, which is incredibly long and rather boring. mmph yeah look at that installation This blog will largely be a chronicling of my experience writing an app for Windows Phone, and hopefully getting it published on the Windows Phone Store. I am certainly not pretending to be making an interesting or revolutionary app, I simply want to see how easy it is for somebody with relatively little programming experience to create an app and push it out to the world. I’m going to be buying a developer’s account as well, so even if this experience isn’t particularly successful, I will have the ability to continue working on apps and growing as a developer. I’m hoping to use this opportunity to make a simple Flashlight app. There are a few reasons for this: for one, I want to understand the bare structure of writing an app, such as classes and functions and such, but while also being able to access simple APIs. I also want to do a Flashlight app because what I’ve found on the Store already is relatively weak; I’m hoping to create something fast, easy and reliable that can be trusted to keep things illuminated. A lot of Flashlight apps in my experience have ads or put a paywall on things like keeping the light on for an extended period of time, which is just ridiculous. I also will be keeping the images on the screen as dark as possible, in order to keep the glare from the screen at a minimum. This will require an unfortunate degree of design, and I hope that I don’t ruin it for everybody simply because I am bad at making things look good. Anyway, I will update this soon enough with information about my initial experiences, but right now I am installing the SDK which is taking a surprisingly long time. The Jump Start videos for Windows 8 app dev...

Read More

UPDATED: Voter Guide for 2013 elections now in HTML

Posted by on Oct 2, 2013 in DGST101 Blogs |

UPDATE 2013-11-05: I’ve written an HTML page in which to put this data for easier viewing. It can be found here.   So I’ve decided to share a document I created for the elections this year in Virginia. It’s a table that shows the candidates’ opinions on all of the major issues of their respective campaigns. Please feel free to let me know if I’ve made any errors or...

Read More
css.php