#WDI Week 8 Notes
- MTA in CoffeeScript
- Todo in Backbone
- Redo Joel's Latin phrases site with Backbone and Wikipedia API
- CoffeeScript CodeSchool tracks
- Backbone CodeSchool tracks
- Read the Backbone.js file
- Fix bug in Sparkr
- Show profile pic after upload in Sparkr
- Specify to upload 3 moment in Sparkr
- Burning Airlines
#Final project notes
##The problem
Music hogs
##The solution
Democratically chosen playlists
class FooController | |
def index | |
# The controller is responsible for gathering the things needed | |
# to make the response. This should be a single line of code | |
@things = Foo.things | |
# The controller is responsible for sending the view back to the user. | |
# the view uses our instance variable above to render @things | |
render :some_view | |
end |
#C# Fundamentals with C# 5.0
##Introduction to C#
To create a new project in Visual Studio:
File, new, Visual C# , Console Application
In the command prompt, cd to the project folder, obj, debugg, and run the .exe file
#LevelUp Backbone Overview
Backbone gives us structure to our code
It has views, models, a router and the html
When dealing with code that works with data, we will deal with the model
When dealing with the logic for each page in the application, we will deal with the view
#Determining how to access data based on the object type
- Call .class on the object that we have to see what type it is
- If it is an array, we can use the array methods (ie .first, .sort [])
- If it is a hash, we can use the hash methods (ie .fetch, h[:foo])
- If it is something else, we can ask what methods it responds to by doing foo.methods - Object.methods
// One key thing with programming (particularly for games or similar things) | |
// is to think about the "data structure" and have this data model separate | |
// from the logic. | |
MS = { | |
initialize: function(boardSize) { | |
MS.world = new Array(boardSize); | |
for(var i=0;i<boardSize;i++) { | |
MS.world[i] = MS.initRow(boardSize); |
// init process | |
Minesweeper.initEvents(); // initialize events. Remember to listen on $(document).on('click', '.cell') | |
// etc... | |
Minesweeper.initializeBoard('M'); // create the board of the right size. | |
Minesweeper.placeMines(); // update Minesweeper.world to update the random cells with mine = true; | |
Minesweeper.calculateSurroundingMines(); // updates each cell to figure out the number of mines surrounding it. | |
Minesweeper.render(); // renders the game board. |
#Questions from Jase Thomas, SBS News Responses included in [Women succeeding in increasingly male-dominated IT industry][sbs]
###Was making the transition to software developing easy, or was it scary and hard?
Transitioning from journalism to web development wasn't scary at all, especially since the tech community in Sydney is so welcoming and supportive. It just felt like something I had to do, so I took the steps to make it happen.
###Were there women helping you make the change?
I wrote my first line of code back in November 2013 at [Rails Girls][railsgirls], a weekend workshop which gives women an introduction to code. I was pretty much hooked from that moment on. I'm extremely thankful for Rails Girls, because I may never have taken the plunge into coding without it.