Friday, March 28, 2014
Thursday, March 27, 2014
Days 12, 13, 14
Angular is not my friend. What really sticks in my craw is how obtuse the error messages are. Everything we've covered up until now I've gotten locked up tight, and when I trip over something, I've gotten pretty good at debugging. Angular has just opened up a whole new dimension of things that can go wrong. Before I just had to worry over whether my code was working but now I have to consider whether the issue is in my code, or on my view, or how my view is bound to my code, or how the new AJAX calls are interacting with the database...
Oh well, I'm just complaining cause Angular gave me a headache today. Also, part of the problem is I can't recognize how useful it could potentially be at this point. We kind of got sold on Angular with promises that it would cut down on the code we had to write, but really it seems like the juggling of all these views negates any coding time saved. I guess the real benefit is the ability to exchange views without refreshing the page, but I'm not dealing with anything that would necessitate bandwidth budgeting, so the virtues of Angular remain to be seen by me.
A couple things have me excited though. There's an Azure event of some kind this Saturday that we were informed of this week. A few people at Coder Camps will be attending. I signed up for a space, and though know I'm worn down enough the thought of giving up my Saturday morning seems a little daunting, it would be the first industry sort of event I have attended. Before Coder Camps, I've never been around more than a couple people at a time that know anything any programming. I'm just kind of looking forward to immersing myself in the culture.
Also, I started working on some problems on Coder Bytes. I've tried programming exercises before but now I have a much better grasp of the vernacular and flow of operations, I actually made some pretty good progress during my lunch break. It's a really satisfying feeling to chew over a question of logic and see your solution work out!
Oh well, I'm just complaining cause Angular gave me a headache today. Also, part of the problem is I can't recognize how useful it could potentially be at this point. We kind of got sold on Angular with promises that it would cut down on the code we had to write, but really it seems like the juggling of all these views negates any coding time saved. I guess the real benefit is the ability to exchange views without refreshing the page, but I'm not dealing with anything that would necessitate bandwidth budgeting, so the virtues of Angular remain to be seen by me.
A couple things have me excited though. There's an Azure event of some kind this Saturday that we were informed of this week. A few people at Coder Camps will be attending. I signed up for a space, and though know I'm worn down enough the thought of giving up my Saturday morning seems a little daunting, it would be the first industry sort of event I have attended. Before Coder Camps, I've never been around more than a couple people at a time that know anything any programming. I'm just kind of looking forward to immersing myself in the culture.
Also, I started working on some problems on Coder Bytes. I've tried programming exercises before but now I have a much better grasp of the vernacular and flow of operations, I actually made some pretty good progress during my lunch break. It's a really satisfying feeling to chew over a question of logic and see your solution work out!
Monday, March 24, 2014
A Zen Garden of Constructors and Function Calls
Something that has been impressed upon me recently is the importance of planning out a program before you start writing code. I understood this in principle before, but I didn't realize how easy it is to lose sight of.
When you learn something new, the temptation is to treat it like what you already know. Shoehorn it in to code you already know to work and hope for the best. Thinking as long as your variables and calls look similar to whats been demonstrated to you, things will work out.
Today though, I took the time to really understand Angular before I tried to start using it.
I even went back and cleaned up my existing code to cement my understanding of what I had written so far. I declared all my variables together. Put my master AJAX up top where I could reference it easily. Put all my HTML verb calls together. Wrote all the functions for my edit and delete buttons in the same place. Once I had it all mapped out, it felt like the code wrote itself. It made it so much easier to debug and play with.
After I had everything neat and tidy, it was much easier to see where Angular fit in. I still had some hiccups I needed a classmate to look at, and really for the most part I feel like I'm just adding "$scope." to a bunch of this I'd written before, but things fell into place a lot more gracefully than it would have been had I just kept hammering away at sloppy code.
Now I feel like I could whip up a website that could post to and update from a database in 15 minutes. My HTML, JavaScript, and AJAX has been cleaned up and smoothed out. The seeds of Angular have a peaceful place to grow.
When you learn something new, the temptation is to treat it like what you already know. Shoehorn it in to code you already know to work and hope for the best. Thinking as long as your variables and calls look similar to whats been demonstrated to you, things will work out.
Today though, I took the time to really understand Angular before I tried to start using it.
I even went back and cleaned up my existing code to cement my understanding of what I had written so far. I declared all my variables together. Put my master AJAX up top where I could reference it easily. Put all my HTML verb calls together. Wrote all the functions for my edit and delete buttons in the same place. Once I had it all mapped out, it felt like the code wrote itself. It made it so much easier to debug and play with.
After I had everything neat and tidy, it was much easier to see where Angular fit in. I still had some hiccups I needed a classmate to look at, and really for the most part I feel like I'm just adding "$scope." to a bunch of this I'd written before, but things fell into place a lot more gracefully than it would have been had I just kept hammering away at sloppy code.
Now I feel like I could whip up a website that could post to and update from a database in 15 minutes. My HTML, JavaScript, and AJAX has been cleaned up and smoothed out. The seeds of Angular have a peaceful place to grow.
Days 10 and 11
Welp, we're into week three. Left Friday with an assignment to work on our "Twitter apps". I had been doing pretty well, got that master AJAX call working on most components, but then my brain turned to mush and I kept running into problems I couldn't think of any solution to other than throwing more code at them. By Monday my app was kind of a mess with everything half working. The profile would update but all the picture links were broken. The database would be updated with new friends that wouldn't be written into my HTML table. The thing that drove me craziest trying to figure out was the 'Delete' buttton that only worked after two clicks.
I took a look at a classmate's JavaScript. He kept his code much more organized than mine and made good use of constructors to make his objects. I think I've just been trying to push ahead so long I lost sight of the big picture of how it all works together. My classmate's code worked better than mine, but even if it wasn't demonstrable more efficient, I think there's a lot to be learned from writing a working version of code in another style, just to gain deeper understanding of how your own code works.
Half an hour after class ended, I had my app rewritten and working perfectly. Ready to tackle today's assignment.
We had our introduction to Angular. I still don't know exactly what to call Angular. It's like a JavaScript add-on MVC framework thingy. All I know is it's supposed to simplify the JavaScript calls we've been writing. I don't have enough of a grasp on it to see how it'll make things that much easier, but I got a good start on today's assignment, so at least I have a feel for how to write it. Hope it comes in handy.
I took a look at a classmate's JavaScript. He kept his code much more organized than mine and made good use of constructors to make his objects. I think I've just been trying to push ahead so long I lost sight of the big picture of how it all works together. My classmate's code worked better than mine, but even if it wasn't demonstrable more efficient, I think there's a lot to be learned from writing a working version of code in another style, just to gain deeper understanding of how your own code works.
Half an hour after class ended, I had my app rewritten and working perfectly. Ready to tackle today's assignment.
We had our introduction to Angular. I still don't know exactly what to call Angular. It's like a JavaScript add-on MVC framework thingy. All I know is it's supposed to simplify the JavaScript calls we've been writing. I don't have enough of a grasp on it to see how it'll make things that much easier, but I got a good start on today's assignment, so at least I have a feel for how to write it. Hope it comes in handy.
Thursday, March 20, 2014
Day 9
Getting those AJAX calls figured out. Covered a master AJAX call that shortens the code quite a bit and after a good deal of debugging, I got it working on my previously built apps.
Going into the weekend, we have been assigned to basically recreate Twitter. We'll see how that goes.
Going into the weekend, we have been assigned to basically recreate Twitter. We'll see how that goes.
Wednesday, March 19, 2014
Day 8
Today we continued working on AJAX calls. Got my code posting to a database and writing objects values to an HTML table. Still not certain on what every line of those AJAX calls means so I need to study that a bit more.
My big take away from today was improving my debugging methodology. Getting better at understanding the DOM and Console inside a browser and using that info to debug my code.
Trying to get a time stamp on objects taken from a database. Close, but it still changes when I update the table. Got to get that static time stamp.
My big take away from today was improving my debugging methodology. Getting better at understanding the DOM and Console inside a browser and using that info to debug my code.
Trying to get a time stamp on objects taken from a database. Close, but it still changes when I update the table. Got to get that static time stamp.
Tuesday, March 18, 2014
Days 5, 6, 7
Friday ended our first week of Coder Camps. We left with an assignment to whip up a simple quiz app. The requirements were to display 5 questions with 4 answers each, when an answer is selected the user should be informed if the answer is correct, only display one question and answer set at a time, and to keep track of the user's score. The stretch goals were to use CSS transitions and animations, and to display an image for each question. I got it pretty much done by the end of the day Friday and touched it up over the weekend.
You can see it HERE (minus the animations for now)
I went into Week 2 feeling pretty good about myself. Project finish, caught up on sleep. I swear I slept 16 hours Friday going into Saturday with constant vivid dreams. I could practically feel my brains data organization mechanisms firing off. Anyways, come Monday I felt ready to tackle anything. We covered the use of objects and arrays in JavaScript and got an assignment to create a web-form that allows the user to input properties of a "Super Hero" and have those values written to a table on the HTML page. I got through that quickly enough and moved on to the next phase of the project.
We were to create a similar app, but one which utilized an object within the array and had a Delete and Edit button. This Delete button caused me a world of hurt. I figured out the syntax for a function that would delete an object off the array a rewrite the table to display the updated result. I tied the function to a button. When I clicked the button, nothing happened. I relocated the location of the function on the JavaScript page, rewrote the HTML displaying the button, tried alternate functions, combed over every line and character of code I had written. Nothing I did got that button to do anything.
I felt awful going into Tuesday with my assignment incomplete. I had a sinking feeling I would fall behind in the class. But, there was nothing more I could do on my own. I turned the problem over in my mind again and again, approaching from every angle I could consider. I was at the mercy of my instructor and classmates. I both looked forward to and dreaded the moment where my simple oversight was pointed out and my code worked perfectly.
Well, it wasn't as simple as a syntax error or misplaced function call. Turned out I got into trouble because of how I named my function. Apparently, "clear" is a reserve word in HTML. My function was "clear()". A simple renaming to "clear2()" got my function running and those object cleared off of my array. Hours and hours spent trying to fix a problem that was barely there.
There's no way I could have known all the reserved words in any language at this point. It does give give me another perspective to approach debugging now though. I think I see why programmers use exotic, silly names for there variables now. It's too easy to run over a word that has some assigned use in a language already.
You can see it HERE (minus the animations for now)
I went into Week 2 feeling pretty good about myself. Project finish, caught up on sleep. I swear I slept 16 hours Friday going into Saturday with constant vivid dreams. I could practically feel my brains data organization mechanisms firing off. Anyways, come Monday I felt ready to tackle anything. We covered the use of objects and arrays in JavaScript and got an assignment to create a web-form that allows the user to input properties of a "Super Hero" and have those values written to a table on the HTML page. I got through that quickly enough and moved on to the next phase of the project.
We were to create a similar app, but one which utilized an object within the array and had a Delete and Edit button. This Delete button caused me a world of hurt. I figured out the syntax for a function that would delete an object off the array a rewrite the table to display the updated result. I tied the function to a button. When I clicked the button, nothing happened. I relocated the location of the function on the JavaScript page, rewrote the HTML displaying the button, tried alternate functions, combed over every line and character of code I had written. Nothing I did got that button to do anything.
I felt awful going into Tuesday with my assignment incomplete. I had a sinking feeling I would fall behind in the class. But, there was nothing more I could do on my own. I turned the problem over in my mind again and again, approaching from every angle I could consider. I was at the mercy of my instructor and classmates. I both looked forward to and dreaded the moment where my simple oversight was pointed out and my code worked perfectly.
Well, it wasn't as simple as a syntax error or misplaced function call. Turned out I got into trouble because of how I named my function. Apparently, "clear" is a reserve word in HTML. My function was "clear()". A simple renaming to "clear2()" got my function running and those object cleared off of my array. Hours and hours spent trying to fix a problem that was barely there.
There's no way I could have known all the reserved words in any language at this point. It does give give me another perspective to approach debugging now though. I think I see why programmers use exotic, silly names for there variables now. It's too easy to run over a word that has some assigned use in a language already.
Thursday, March 13, 2014
Day 4
We covered JavaScript objects today. Mostly just an extension of arrays we covered the day before. We implemented objects as a data collection method in our "To Do" apps. I find myself stubborn in adapting new methods of adding functionality to a program once I already have it working with a previously covered set of knowledge. I think it's easier to just start from scratch when it comes to implementing a new code element. Maybe I should keep my code more compartmentalized so new tools can be used on it.
We received an assignment to create a Quiz application. After some incessant picking at my "To Do" app, I spent about an hour working in the Quiz. I got as far as a button calling a function to display a new question when clicked. Adding new results to the function should be enough to get the Quiz usable. We'll see what new issues arise.
I didn't make any notes to myself on what to write on the blog today. Forgot my pen and notebook. I'll write something more insightful when I have a better record and more sleep.
We received an assignment to create a Quiz application. After some incessant picking at my "To Do" app, I spent about an hour working in the Quiz. I got as far as a button calling a function to display a new question when clicked. Adding new results to the function should be enough to get the Quiz usable. We'll see what new issues arise.
I didn't make any notes to myself on what to write on the blog today. Forgot my pen and notebook. I'll write something more insightful when I have a better record and more sleep.
Wednesday, March 12, 2014
Day 3
Today we went over arrays in JavaScript. We modified our projects from day 2 to utilize arrays to hold the values of text input fields. Still very satisfying when we got them to work, but so frustrating to change code that's already working to use a feature you aren't well practiced in. Any bit of code I can get to work is still precious to me. Feels reckless to fiddle with it after I get it working.
We also got an introduction to the Bootstrap css format. Very enlightening to learn such a practical tool and realize how widely implemented it is. I feel like I'm progressing as a web developer, but even more so I feel like I'm learning how much less difficult development is than I assumed it was. One of those "a day to learn, a lifetime to master" sort of deals I guess.
Also our instructor mentioned an interesting thing about JavaScript. Seems iteration using variable++ is frowned upon as it can be a security liability. Who would thunk?
We also got an introduction to the Bootstrap css format. Very enlightening to learn such a practical tool and realize how widely implemented it is. I feel like I'm progressing as a web developer, but even more so I feel like I'm learning how much less difficult development is than I assumed it was. One of those "a day to learn, a lifetime to master" sort of deals I guess.
Also our instructor mentioned an interesting thing about JavaScript. Seems iteration using variable++ is frowned upon as it can be a security liability. Who would thunk?
Tuesday, March 11, 2014
Learning and Teaching
Today we did our first paired programming exercise. As the requirements were laid out, I formulated a step by step solution to implement the necessary code. It wasn't perfect, but would have put me on the right track. When it came time to close my laptop and communicate with my partner, I found we had different ideas on how to approach the problem.
My partner was much more experienced than I, and in the end he found a very clever solution. But as were drifted further from my initial approach, I found myself grasping the concepts less and less. Maybe I would have followed along better if I had more sleep the night before. I think anxiety still has a hold of my sleep patterns. It was frustrating not being able to put my fingers to the keys. It really showed me some of the limitations of my understanding.
I was however able to convey to another camper how to implement my Morse code translator code into a script that allowed him to take user input of a country of origin and return a greeting in said country's native language. Teaching him that helped solidify my understanding of the code I had previously written.
I'm learning a lot about coordination in programming.
My partner was much more experienced than I, and in the end he found a very clever solution. But as were drifted further from my initial approach, I found myself grasping the concepts less and less. Maybe I would have followed along better if I had more sleep the night before. I think anxiety still has a hold of my sleep patterns. It was frustrating not being able to put my fingers to the keys. It really showed me some of the limitations of my understanding.
I was however able to convey to another camper how to implement my Morse code translator code into a script that allowed him to take user input of a country of origin and return a greeting in said country's native language. Teaching him that helped solidify my understanding of the code I had previously written.
I'm learning a lot about coordination in programming.
Day 2
Today we covered some interesting aspects of JavaScript I hadn't yet come across. Mainly some best practices in response to the order in which JavaScript reads variables. Some real good practical knowledge I never encountered in my self-study.
We also covered some HTML, which in itself wasn't new ground for me, but implementing it within Visual Studio opened up a lot of possibilities I was unaware of. VS's Intellisense functionality seems like a huge time saver and a good way to explore options I had no idea existed. I couple spend hours just typing in an attribute for an HTML element and running through the drop down menu of values Intellisense provides.
Taken together, I was able to improve the script I wrote a few months back (not yet implemented). I had been trying to think of a way to write the results to the webpage for people to copy. Now I know!
We also covered some HTML, which in itself wasn't new ground for me, but implementing it within Visual Studio opened up a lot of possibilities I was unaware of. VS's Intellisense functionality seems like a huge time saver and a good way to explore options I had no idea existed. I couple spend hours just typing in an attribute for an HTML element and running through the drop down menu of values Intellisense provides.
Taken together, I was able to improve the script I wrote a few months back (not yet implemented). I had been trying to think of a way to write the results to the webpage for people to copy. Now I know!
Monday, March 10, 2014
Languages
My sister was asking me today how I remember all the different components of a computer programming language.
I told her simply, I don't.
Through the internet, I have access to the full vocabulary of any programming language. I only need to know that something might exist, and if so, how to find it.
My sister is learning Swahili, so I gave her the example of trying to find the word for 'internet' in Swahili. It's a word of recent origin and largely used within specific professional communities, so it was likely to be a borrowed word with maybe some slight phonetic variation. From that context, one could assume that using the word 'internet' within a larger Swahili dialogue would be understood by the listener.
She told me the Swahili word for 'internet' was 'biashara ya', so maybe it was a bad example.
The point stands, it's more important to understand how a programming languages operates than memorizing all its components.
I told her simply, I don't.
Through the internet, I have access to the full vocabulary of any programming language. I only need to know that something might exist, and if so, how to find it.
My sister is learning Swahili, so I gave her the example of trying to find the word for 'internet' in Swahili. It's a word of recent origin and largely used within specific professional communities, so it was likely to be a borrowed word with maybe some slight phonetic variation. From that context, one could assume that using the word 'internet' within a larger Swahili dialogue would be understood by the listener.
She told me the Swahili word for 'internet' was 'biashara ya', so maybe it was a bad example.
The point stands, it's more important to understand how a programming languages operates than memorizing all its components.
Day 1
I just completed the first day of Coder Camps.
Up until now, I've just been covering the prerequisites leading up to the course. They consisted of lessons on HTML, CSS, JavaScript, and Visual Studio Express for Web.
I had covered the coding elements before on my own, so the prereqs were mostly review for me. The most enlightening thing I found was just downloading VS for Web and running through a couple tutorials. It was interesting just working with the same tools professional developers use to create enterprise level web applications.
I've used the analogy that Visual Studio is like Photoshop. Previously, writing code line by line, it was like creating a picture pixel by pixel. Visual Studio allows a developer to paint a website in broader strokes. VS has the templates and built-in functions that make developing an enterprise level website feasible in a timely manner.
Day 1 of camp has largely been a review of the prereq material and a presentation of the teaching philosophy.
Looking forward to jump into fresh material soon.
Up until now, I've just been covering the prerequisites leading up to the course. They consisted of lessons on HTML, CSS, JavaScript, and Visual Studio Express for Web.
I had covered the coding elements before on my own, so the prereqs were mostly review for me. The most enlightening thing I found was just downloading VS for Web and running through a couple tutorials. It was interesting just working with the same tools professional developers use to create enterprise level web applications.
I've used the analogy that Visual Studio is like Photoshop. Previously, writing code line by line, it was like creating a picture pixel by pixel. Visual Studio allows a developer to paint a website in broader strokes. VS has the templates and built-in functions that make developing an enterprise level website feasible in a timely manner.
Day 1 of camp has largely been a review of the prereq material and a presentation of the teaching philosophy.
Looking forward to jump into fresh material soon.
Subscribe to:
Comments (Atom)