<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
Sometimes you want to use a gem on Heroku that is in a private repository on GitHub.
Using git over http you can authenticate to GitHub using basic authentication. However, we don't want to embed usernames and passwords in Gemfiles. Instead, we can use authentication tokens.
First you will need to get an OAuth Token from GitHub using your own username and "note"
# This program will select at random a set of speakers and look at the gender breakdown given 20% women | |
total_speakers = 15 | |
percentage_of_women = 0.25 | |
hist, list, results = {}, [], [] | |
(1000 * (1 - percentage_of_women)).floor.times{list << 0} | |
(1000 * percentage_of_women).floor.times{list << 1} |
# Add the following configuration to your config/environments/development.rb file | |
# | |
# This will set the Rails to log to STDOUT (insetad of log/development.log) as well | |
# as tag all assets request log lines with [assets] | |
# | |
# You can then pipe it into grep to filter out the asset lines | |
# | |
# tail -f log/development.rb | grep -v '\[assets\]' | |
# | |
# If you log to STDOUT rather than log/development.rb then you can: |
On Tue, Mar 12, 2013 at 1:26 PM, Martin Fowler [email protected] wrote:
The term pops up in some different places, so it's hard to know what it means without some context. In PoEAA I use the pattern Service Layer to represent a domain-oriented layer of behaviors that provide an API for the domain layer. This may or may not sit on top of a Domain Model. In DDD Eric Evans uses the term Service Object to refer to objects that represent processes (as opposed to Entities and Values). DDD Service Objects are often useful to factor out behavior that would otherwise bloat Entities, it's also a useful step to patterns like Strategy and Command.
It sounds like the DDD sense is the sense I'm encountering most often. I really need to read that book.
The conceptual problem I run into in a lot of codebases is that rather than representing a process, the "service objects" represent "a thing that does the process". Which sounds like a nitpicky difference, but it seems to have a real impact on how people us
Web fonts are pretty much all the rage. Using a CDN for font libraries, like TypeKit or Google Fonts, will be a great solution for many projects. For others, this is not an option. Especially when you are creating a custom icon library for your project.
Rails and the asset pipeline are great tools, but Rails has yet to get caught up in the custom web font craze.
As with all things Rails, there is more then one way to skin this cat. There is the recommended way, and then there are the other ways.
Here I will show how to update your Rails project so that you can use the asset pipeline appropriately and resource your files using the common Rails convention.
class Roro | |
def initialize(host, speakers = []) | |
@host = host | |
@speakers = speakers | |
end | |
def start | |
@host.speak | |
end | |
end |
A lot of these are outright stolen from Edward O'Campo-Gooding's list of questions. I really like his list.
I'm having some trouble paring this down to a manageable list of questions -- I realistically want to know all of these things before starting to work at a company, but it's a lot to ask all at once. My current game plan is to pick 6 before an interview and ask those.
I'd love comments and suggestions about any of these.
I've found questions like "do you have smart people? Can I learn a lot at your company?" to be basically totally useless -- everybody will say "yeah, definitely!" and it's hard to learn anything from them. So I'm trying to make all of these questions pretty concrete -- if a team doesn't have an issue tracker, they don't have an issue tracker.
I'm also mostly not asking about principles, but the way things are -- not "do you think code review is important?", but "Does all code get reviewed?".
1) Latest brews. | |
$ brew update | |
2) Install packages. | |
$ brew install chruby ruby-install selecta | |
3) Load chruby when the shell inits. | |
echo >> ~/.zshrc | |
if [ -d /usr/local/opt/chruby ]; then | |
. /usr/local/opt/chruby/share/chruby/chruby.sh |
Yo!
I'm selling my Macbook Pro Retina (mid 2012). This machine has served me well in many battles. It has witnessed me unleash the fury of a thousand suns while building many Internets around the world.
The specs: