Jared Cohen

@jaredcohe
thetruthaboutlawschool.com

May 5

Errors using brew install and brew update

I’m not a web developer, I just pretend to be one in my spare time, so please forgive (and point out) mistakes.

I had been reading a lot about the benefits of using PostgreSQL over MySQL. I found this Railscast, which like all Railscasts, is fantastic. But, when trying to install PostgreSQL with Homebrew, I kept getting errors, including:

curl: (7) couldn’t connect to host Error: Failure while executing: curl -f#LA ‘Homebrew 0.7.1 (Ruby 1.8.7-174; Mac OS X 10.7.3)’

I Googled and found that my Homebrew might be out of date, so I tried the proposed solution:

brew update

But, that gave me more errors even after I played around with it:

error: Untracked working tree file ‘.gitignore’ would be overwritten by merge.

and

error: The following untracked working tree files would be overwritten by checkout:

More Goolging and I finally confirmed that my Homebrew was out of date, and because of that, ironically, brew update wouldn’t work.

I went into my /usr/local directory:

cd /usr/local

and updated Homebrew with git:

git fetch https://github.com/mxcl/homebrew.git

git reset −−hard FETCH_HEAD

That worked.

I then had to update Xcode to 4.3. And the install command worked:

brew install postgresql


Comments
Feb 11

Artist JR’s Ted Talk: Free the art. Free the mind.

“A really important point for me is that I don’t use any brand or corporate sponsors. So I have no responsibility to anyone but myself and the subjects. And that is for me one of the more important things in the work. I think, today, as important as the result is the way you do things.”
- JR

Free the art. Free the mind.

Beautiful and inspiring Ted Talk by Artist JR on his work “showing the world its true face.”


Comments
Feb 10
kickstarter:

Our second million dollar project. Tim Schafer’s project just passed $1M in funding, in less than 24 hours, from more than 26,000 backers. That is incredible.

kickstarter:

Our second million dollar project. Tim Schafer’s project just passed $1M in funding, in less than 24 hours, from more than 26,000 backers. That is incredible.


Comments
Jan 24

You might have fooled me for the second time tonight, President Obama

Dear President Obama,

I voted for you the first time because you said so many of the right things, and I believed you. You fooled me. The last few years are not what I had hoped for in many ways. The leadership potential I saw during your campaign went missing when you took office.

In the State of the Union tonight, you said all the right things again and reminded me why I voted for you the first time. You might have fooled me again.

Your list of priorities to secure our future is the same as my list, and in many ways, the same list that made us great in the past:

  • Funding and reforming education
  • Funding scientific research
  • Funding infrastructure
  • Drawing and keeping job-creating immigrants

Some of your other top points are also mine:

  • Congress needs to grow up
  • Fair tax system
  • No bailouts

You even (briefly) talked about the need to make difficult spending cuts in social security, medicare, and medicaid. (I could have used a few more cuts and a bit more on the difficult decisions.)

You said so many of the right things, President Obama. Just like last time. I believe you, President Obama. Just like last time.

This time, in addition to saying all the right things, please also lead us toward them. Whatever it takes.


Comments

The PIPA/SOPA People’s Revolt Was Beautiful, But the Public Doesn’t Have Time to Babysit Congress

Senator Ron Wyden of Oregon wrote a thoughtful piece for Wired on the PIPA/SOPA people’s revolt. In it, he stated:

“While some have derided the events of last week as a departure from the way we do things in Washington, I believe last week is an example of the way Washington can change for the better. If more Americans took the time to be informed and call Congress when something matters to them lobbyist and special interest power would be greatly diminished.”

Americans should be more involved in their government, lobbyist and special interest power does need to be diminished, and the (maybe temporary) defeat of PIPA/SOPA was a beautiful thing to experience.

However, many people are busy with their daily lives: teaching and learning, creating jobs, healing patients, researching cures, manufacturing goods, keeping our cities and towns safe, and so on. Those people’s time is much better spent on those tasks. The amount of time that many very smart and busy people wasted paying attention to PIPA/SOPA hurts us all. The federal and state governments need to get some work done themselves, and not require constant supervision like a baby who has just learned to crawl that you can’t turn your back on for a second.

Something fundamental in the system has to change. Just ask Lawrence Lessig.

P.S. Thank you, Senator Wyden, for your work in defeating PIPA/SOPA and for speaking out against the disproportionate power of lobbyists and special interests. We need more leaders like you.


Comments
Jan 15

Week (Or Two) In Review: January 15, 2012

White House leadership is still lacking, but at least the terrible bill paid for by Hollywood lobbyists has stalled

After public outcry and some backpedaling by congressional co-sponsors, the White House finally chimes in with a position on PIPA/SOPA:

“While we believe that online piracy by foreign websites is a serious problem that requires a serious legislative response, we will not support legislation that reduces freedom of expression, increases cybersecurity risk, or undermines the dynamic, innovative global Internet.”

The response leans in the right direction, but still seeks a “legislative” solution, leaving open the door to pleasing Hollywood donors and lobbyists. Tim O’Reilly pointed out some issues with the White House’s statement. And, Steve Blank has a good piece on Why The Movie Industry Can’t Innovate and the Result is SOPA.

The power of the internet was evident in the change in position by the White House and Congress. Twitter, Facebook, Tumblr, Reddit, and other websites allowed citizens to educate each other, learn about the issue, take action, and get results. People who have full-time jobs, families, and many other things going on were also able to participate in government. This was a beautiful and encouraging thing.

(If you’re in New York and want to get even more involved, join the protest on Wednesday and tell Senator Charles Schumer and Senator Kirsten Gillibrand that their support of PIPA and being owned by Hollywood lobbyists or any other special interest is unacceptable.)

While the U.S. government serves wealthy donors, the common good suffers

SOPA/PIPA is a great example of the state of the U.S. government, pandering to wealthy donors at the expense of the common good. The list of bad laws with a similar origin continues to grow. As Lawrence Lessig explains:

“Businesses increasingly recognize that their highest return on investment comes not from inventing the next great widget, instead spending money on lobbyists who can get special deals built into the tax code or built into the government spending programs that give them a higher return than any of the investment that they would ever make by investing in genuine innovation.”

A similarly motivated bill working its way through Congress is The Research Works Act. The RWA would overturn a National Institutes of Health policy that makes publicly-funded research available to the public. As Gilles Frydman explains: “Seeing a corrupt travesty of the democratic process used today to promote the interests of a few gatekeepers at the expense of millions of people is very disturbing. The NIH and other agencies must be allowed to ensure timely, public access to the results of research funded with taxpayer dollars.”

While Congress is busy pushing bills that serve wealthy donors, little or no attention is paid to much more important issues that could actually improve the daily lives of Americans and the future of our country, such as the budget deficit, tax reform, patent reform, infrastructure, financial system instability and a structure that privatizes gains and socializes losses, and immigration rules that keep out or kick out smart, educated foreigners who could be creating jobs in the U.S.

I’m still waiting for that change I voted for, President Obama.

People like Rick Santorum, who want to regulate your bedroom and don’t believe in equality, are still competitive in American elections

From The Economist: “Gays should not only be disqualified from serving their country, says Mr Santorum. They should also be prohibited from marrying one another. Even if unmarried, they would be ill-advised to have sex. … As president, he said more recently, he would at last address ‘the dangers of contraception in this country’, because contraception is a ‘licence to do things in a sexual realm that are counter to how things are supposed to be’.”

Where are the kinds of leaders the U.S. used to have and desperately needs today?

Wired reported: “Sen. Orrin Hatch (R-Utah) suggested Tuesday that people who download copyright materials from the Internet should have their computers automatically destroyed.” I put this idea on the same level as my idea about attaching a boxing glove to the side of every computer monitor that punches you in the face when you do something stupid. This is not the level of leadership we need in this country.

On that note, last week, Tim O’Reilly Tweeted this speech by William Deresiewicz, who makes many interesting points about leadership and its recent absence from the U.S. He states: “We have a crisis of leadership in America because our overwhelming power and wealth, earned under earlier generations of leaders, made us complacent, and for too long we have been training leaders who only know how to keep the routine going. Who can answer questions, but don’t know how to ask them. Who can fulfill goals, but don’t know how to set them. Who think about how to get things done, but not whether they’re worth doing in the first place. What we have now are the greatest technocrats the world has ever seen, people who have been trained to be incredibly good at one specific thing, but who have no interest in anything beyond their area of exper­tise. What we don’t have are leaders.”

What are today’s Washington, Adams, Jefferson, Hamilton, Lincoln, and FDR doing? Are they content with their daily lives as doctors, lawyers, teachers, engineers, business people, and parents? Is the reason we had great leaders in the past that we faced greater problems? Is now the time great men and women must again get more involved in leading the country? We have the wrong leaders in place now. Who and where are the right ones? Are you one of them?

This country and world need more people like Bill Gates.

This is truly amazing and inspiring. Since 2007, Bill Gates has given to charity $28 billion, almost half his net worth, and saved almost 6 million lives and counting. Mr. Gates is a true superhero. Check out these statistics about him and some other huge givers.

Science is cool.

Pentagon scientists distort light to make events disappear.

Comments
Jan 11
kickstarter:

Today,  Jared conducted our All Hands staff meeting in a hot dog suit.  That is all.

kickstarter:

Today, Jared conducted our All Hands staff meeting in a hot dog suit. That is all.


Comments
Dec 10

Disproportionate Satisfaction: Narrow the Table with “word-break: break-all;”

One of the most annoying things about building stuff, whether online or physical, is when something so small wastes so much time. I made an HTML table, a simple, plain table.

table, th, tr, td, a class or two, an id, nothing unusual.

But the table would not narrow beyond a certain point. I tried decreasing the width of it, everything in it, everything around it. I changed margins and borders. I moved the table around on the page. I moved the table to a new page. Nothing worked. I knew I had to be missing something simple. That’s pretty much always the answer. Even Google couldn’t help because I couldn’t get the right search terms.

I almost resorted to emailing a real engineer, which is my usual and absolute last resort.

Finally, I tried changing the data in the table and it worked. I then Google a few more times, different search terms, read Stack Exchange. I found something. The stubborn table would not narrow because a block of text with no spaces in it was pushing back. I added “word-break: break-all;” to the CSS and it worked.

The sense of satisfaction from solving something so small and simple could not have been more disproportionate. That’s one of the reasons I love building stuff: disproportionate satisfaction.


Comments
Sep 6

The wrong question: “I want to learn to code, what should I do?”

If you want to learn to code and build stuff and you’re starting by asking someone else what you should do, you’re already thinking about it the wrong way. Immediately, right now, with no preparation, in the blink of an eye, you can take a huge step toward your goal by realizing that you don’t need an answer to your question. You can do it all by yourself. Everything you need is waiting for you. Go get it. No one can stop you. Ready?

Go to Google and start asking questions. You want to make a webpage? Ask. You want to know what the different coding languages are and which you should learn? Ask. You’ve started building stuff, and now you want to know how to add a border, change the color, add a form, fix an error, install software, host a website? Ask. The answer to every question is out there. Engineers know that better than anyone. Even the best engineers ask Google questions all the time. The biggest difference between you and an engineer is the mindset.

After you have the right mindset, here is how the execution will go:

You start asking Google questions, which leads you to all sorts of resources on StackExchange and Quora and a million blogs and other websites. You find twelve tutorials on HTML and nine on CSS, and you bounce around between them to find the best ones. You do several of them, including some of these and these. You download a free text editor, maybe Eclipse, or you find one already waiting on your computer. You make a couple simple web pages, and while doing that, you realize that every answer really is on the internet.

You want to add cool features to your website. Google tells you how to make a button change colors when your mouse hovers over it. You realize the power of CSS and you start watching these videos. You want to click on your color-changing button and have part of the page change without going to a completely new page, so you ask Google and realize you should learn the basics of Javascript and jQuery. You find tutorials and you can soon write simple code that produces magical results.

You want to supplement your solitary learning with human contact so you join the community by following the blogs and Twitters of designers and engineers, and going to Meetups.

You buy a Mac because you’re embarrassed that you ever used anything else. You continue to build momentum, and you start researching engineering jobs. You realize that your front end skills are coming along, but you want to be the complete package, so you figure out that Ruby on Rails is the way to go, you find this, this, and this, and you watch these, and you learn it!

You’re now building stuff and you are completely confident that anything you want to do, you can figure it out without having to ask someone. And no one can stop you!

You’re so grateful for all the resources that are available for free that you want to contribute, so you start your own blog about building websites, you Tweet about it, and you put your code on Github for everyone to use and learn from.

You’re done.

This difference in mindset of “Who is going to stop me?” versus “How do I do that?” applies to learning and life in so many ways. Get in the mindset that you can do it yourself, whatever it is, if you just dedicate yourself to doing it. You’ll be shocked by how much you can learn and how far you’ll get. That mindset separates people who do from people who don’t.

“Leaders are not, as we are often led to think, people who go along with huge crowds following them. Leaders are people who go their own way without caring, or even looking to see, whether anyone is following them. ‘Leadership qualities’ are not the qualities that enable people to attract followers, but those that enable them to do without them. They include, at the very least, courage, endurance, patience, humor, flexibility, resourcefulness, stubbornness, a keen sense of reality, and the ability to keep a cool and clear head, even when things are going badly. True leaders, in short, do not make people into followers, but into other leaders.”
- John Holt*

In conclusion, to answer your question: “I want to learn to code, what do I do?”

Learn to code.


Comments
Jul 30

Comments
Page 1 of 2