- Creating / Definition
- Single vs. Double Quoted Strings
- Combining Strings and Other Data
- Concatenation with
+
- Wrapping in an Array and using
join
- Concatenation with
- Interpolating
http://dl.airserver.com/mac/AirServer-5.3.2.dmg | |
Your Activation Code is: | |
4MVPDGD68GRRCC8VJ4 |
test/coverage/ |
- Building projects is the best way to develop and refine your skill as a developer
- And while you have 0 years of professional software development experience, people are going to be skeptical that you can actually do the things you say you can do.
- Your portfolio serves as a form of proof. Your portfolio isn’t going to win you a job, but it can win you an interview.
- And one thing I’ve been saying over and over the last few months — job applications do not reliably convert to interviews, but interviews reliably convert to jobs.
- Typically if you get into about 5 interview processes then you’re going to get a job offer. 10 interview processes and you might see 2 or 3 job offers.
- So you build projects to build your skill, but you might as well build projects that build your portfolio that could then make someone say “sounds interesting…bring them in for an interview.”
The normal controller/view flow is to display a view template corresponding to the current controller action, but sometimes we want to change that. We use render
in a controller when we want to respond within the current request, and redirect_to
when we want to spawn a new request.
The render
method is very overloaded in Rails. Most developers encounter it within the view template, using render :partial => 'form'
or render @post.comments
, but here we'll focus on usage within the controller.
## L1. Append Multiple Nodes and Count | |
def test_(self): | |
import list | |
list = list.List() | |
self.assertEquals(list.count(), 0) | |
list.append("one") | |
list.append("two") | |
list.append("three") |
# This was the first version where the list does more "head-checking" | |
# instead of the final version (list.py) where the head uses a null object | |
class RecursiveList: | |
def __init__(self): | |
self.head = None | |
def count(self): | |
if self.head: | |
return self.head.count() |
class Node: | |
def __init__(self, value): | |
self.value = value | |
self.link = None | |
def append(self, value): | |
if self.link: | |
self.link.append(value) | |
else: | |
self.link = Node(value) |
HTTP is a stateless protocol. Sessions allow us to chain multiple requests together into a conversation between client and server.
Sessions should be an option of last resort. If there's no where else that the data can possibly go to achieve the desired functionality, only then should it be stored in the session. Sessions can be vulnerable to security threats from third parties, malicious users, and can cause scaling problems.
That doesn't mean we can't use sessions, but we should only use them where necessary.