I'm getting back into video tutorials! This one covers the classic Fizzbuzz coding kata. Here I do it with a TDD (Test Driven Development) approach, starting with the unit tests and following the red-green-refactor cycle. Enjoy!
0 Comments
Hour of Code exercises Link - https://code.org/learn/ There are a lot of hoops and traps to get past when setting up an IDE, and this can be a real turn-off for kids. I can remember when I was an early teenager trying to set up eclipse or flash builder. I really had no idea what I was doing, and I was either trying random things as if hacking away at forest brush with a machette or following along step-by-step with an online guide. It's tough for beginners, and it's a shame that most kids give up or are too afraid to start, and they never really get to the funs part of coding; deciding how to use the given api to build things, solving a problem to get the code working as you intended, or seeing something that you made run.
Let me begin by saying that I don't like reading grammar mistakes. To me, reading blatant errors shows a lack of intelligence and casts doubt on the validity of the claims in the text. However, much like coding, I believe that writing should be an organic process where you plop your thoughts down in words and then refactor it later. With code, however, you have a compiler to check your work. For word processors like Microsoft Word or Google Docs there is no compiler to run the text through and reveal grammar mistakes with the same level of detail as a skilled proofreader (note to self- this could be good project). These programs love to tout how they have grammar checking engines, but it seems that at the moment human proofreading is the best method for catching and fixing the most errors.
In the world today users will take for granted the ability to use the tab key on the keyboard to navigate between text fields in a form. In Flash you are building dialog boxes from shapes and TextFields so it can't guess how you want the tabs to be controlled. Luckily, you are given total control over this because text fields have the properties tabIndex and tabEnabled.
Tab index – This is an integer that basically allows you to put this text field in a list relative to all the other fields. The first one we should have a tabIndex of one, the second tabIndex of two, and so on. So suppose now you have the text field with tab index of one selected (which for TextFields just means that there is a cursor blinking inside of it). Then pressing tab will move your cursor to the TextField with index two. If you press tab again when the selection is on the text field the highest index then the list will loop back around, and the one that has index one will be selected.
I've recently discovered this syntax lighting website, and I'm really liking it a lot. With my new weebly theme, the alex gorbachev library stopped working (the code always looked black). With this hilite.me highlighted syntax generator it's a breeze to embed code into my web pages and blog posts now. Here's a screenshot of what it looks like:
|
AuthorThe posts on this site are written and maintained by Jim Lynch. About Jim...
Categories
All
Archives
March 2023
|