Eater of Cheese, Rider of Bikes, Coder of Ruby
30 stories
·
1 follower

Every Last Jedi

1 Comment and 3 Shares

This is a spoiler-filled first set of reactions to Star Wars: The Last Jedi.

The ultimate courage of what Rian Johnson has done here, is that he fully embraced what it is to be a director who obviously grew up as true fan of Star Wars, and retconned the whole universe into a new understanding of The Force. It’s the kind of revolutionary rethinking of the most successful pop culture franchise of all time that I would have thought would not be possible by anyone but George Lucas, and certainly not under the auspices of Disney. But here we are.

Though it’s well-grounded in the first definitions of The Force that we were introduced to in the original trilogy, The Last Jedi presents a radically inclusive new view of the Force that is bigger and broader than the Jedi religion which has thus-far colored our view of the entire Star Wars universe. (This is also why lost-cause diehards will likely always hate this film.)

On a personal level, it really makes me smile to know that in Carrie Fisher’s last film, in her most famous role, she’d get to know that the vision of what the franchise was about would be broadened to include everyone. Now, every kid who ever picked up a broomstick and pretended to be Luke Skywalker with a lightsaber is canonically one with the Force. It’s a wonderful summation of what Star Wars, at its best, represents in culture.

It’s also a brave film for its willingness to subvert the expectations of the most hardcore fans. In many ways, The Last Jedi is anti-fan service. Tonally, it’s totally different than the other films in the series. Flashbacks and editing sequences like when Rey first sees the Force feature a wildly different direction style than Lucas ever would have tried. Jokes like the initial Poe-Hux call are completely out of character for the voice of the other films (especially the prequels). And the Jedi are no longer an infallible inherited priesthood, but a religion of self-absorbed, usually short-sighted monks who neglect the beauty of the Force in favor of exploiting it for their own power. Any one of these would antagonize those who were overly invested in the old order; all of them together is rank heresy.

But for an open-minded viewer, there are wonderful touches throughout. Rey gets to be a whole person, who grounds the film and is brave and grows, without ever being reduced to a love interest or damsel in distress. Similarly, Rose gets to be not just the first Asian American woman to be featured in Star Wars, but the avatar of the theme of the entire film. The porgs porg it up. Lots of stuff is red. The sound design uses silence more effectively than any blockbuster film since Attack of the Clones. There’s not much Threepio. It’s all pretty great.

Most of all, it sets us up for a third film where, for the first time in 37 years, we don’t know what’s going to happen next with Star Wars. Restoring our sense of wonder or mystery or surprise about the most culturally dominant franchise of all time is one of the toughest challenges any mainstream director could pull off. Succeeding in that challenge makes The Last Jedi a wonderful gift to every kid who ever swung a broomstick lightsaber.

Read the whole story
jordanbrock
129 days ago
reply
Perth, Western Australia
Share this story
Delete
1 public comment
jhamill
90 days ago
reply
Just saw it again today. I am so glad Rey did not end up as a love interest. I love angry old Luke Skywalker. I'm so happy they didn't keep him as the hopeful kid from the original trilogy. I mean, how can you not be angry after spending the last 10ish years alone on an island thinking about how you think you messed up?
California
sirshannon
89 days ago
I'm afraid to go back and watch my current top 2 SW movies because I'm afraid my memories of them may be the only thing keeping The Last Jedi in the number 3 spot.

Seven Years

9 Comments and 34 Shares
[hair in face] "SEVVVENNN YEEEARRRSSS"
Read the whole story
jordanbrock
129 days ago
reply
Perth, Western Australia
popular
130 days ago
reply
Share this story
Delete
9 public comments
chrisrosa
130 days ago
reply
😢
San Francisco, CA
rjstegbauer
131 days ago
reply
Touching and beautiful! One of your best.
alt_text_bot
132 days ago
reply
[hair in face] "SEVVVENNN YEEEARRRSSS"
ameel
132 days ago
reply
<3
Melbourne, Australia
MaryEllenCG
132 days ago
reply
::sniffle::
Greater Bostonia
kyleniemeyer
132 days ago
reply
😭
Corvallis, OR
louloupix
132 days ago
reply
That's why I still watch it..Time to time they deliver...
Celine17
122 days ago
j'ai toujours autant de mal à comprendre la trame...
marcrichter
132 days ago
reply
Awesome. I'm speechless.
tbd
deezil
132 days ago
reply
OKAY I'M CRYING AT MY DESK NOW.
Louisville, Kentucky
sfrazer
132 days ago
God damnit, Randal.
deezil
132 days ago
For those that don't know the whole story: Approximately 7 years ago (imagine that) Randall posted this on the blog https://blog.xkcd.com/2010/11/05/submarines/ and made some vague references to tough times in the comics. On in to 2011, he posted this on the blog, and things seemed to be scary but hopeful. https://blog.xkcd.com/2011/06/30/family-illness/ . He's made mention several times about it over the years inside the comics, and I really believe that "Time" was made for some express purpose as to get his emotions out. But this update seriously is making a grown 32 year old man weep openly at his desk (thankfully I have a door that closes), as I always wondered how things were. Things look good, and this makes my heart happy.

Saudi Arabia may go broke before the US oil industry buckles

1 Share

If the aim was to choke the US shale industry, the Saudis have misjudged badly, just as they misjudged the growing shale threat at every stage for eight years. "It is becoming apparent that non-OPEC producers are not as responsive to low oil prices as had been thought, at least in the short-run," said the Saudi central bank in its latest stability report.

"The main impact has been to cut back on developmental drilling of new oil wells, rather than slowing the flow of oil from existing wells. This requires more patience," it said.

One Saudi expert was blunter. "The policy hasn't worked and it will never work," he said.

By causing the oil price to crash, the Saudis and their Gulf allies have certainly killed off prospects for a raft of high-cost ventures in the Russian Arctic, the Gulf of Mexico, the deep waters of the mid-Atlantic, and the Canadian tar sands.

Consultants Wood Mackenzie say the major oil and gas companies have shelved 46 large projects, deferring $200bn of investments.

The problem for the Saudis is that US shale frackers are not high-cost. They are mostly mid-cost, and as I reported from the CERAWeek energy forum in Houston, experts at IHS think shale companies may be able to shave those costs by 45pc this year - and not only by switching tactically to high-yielding wells.

Advanced pad drilling techniques allow frackers to launch five or ten wells in different directions from the same site. Smart drill-bits with computer chips can seek out cracks in the rock. New dissolvable plugs promise to save $300,000 a well. "We've driven down drilling costs by 50pc, and we can see another 30pc ahead," said John Hess, head of the Hess Corporation.

It was the same story from Scott Sheffield, head of Pioneer Natural Resources. "We have just drilled an 18,000 ft well in 16 days in the Permian Basin. Last year it took 30 days," he said.

The North American rig-count has dropped to 664 from 1,608 in October but output still rose to a 43-year high of 9.6m b/d June. It has only just begun to roll over. "The freight train of North American tight oil has kept on coming," said Rex Tillerson, head of Exxon Mobil.

He said the resilience of the sister industry of shale gas should be a cautionary warning to those reading too much into the rig-count. Gas prices have collapsed from $8 to $2.78 since 2009, and the number of gas rigs has dropped 1,200 to 209. Yet output has risen by 30pc over that period.

Until now, shale drillers have been cushioned by hedging contracts. The stress test will come over coming months as these expire. But even if scores of over-leveraged wild-catters go bankrupt as funding dries up, it will not do OPEC any good.

The wells will still be there. The technology and infrastructure will still be there. Stronger companies will mop up on the cheap, taking over the operations. Once oil climbs back to $60 or even $55 - since the threshold keeps falling - they will crank up production almost instantly.

OPEC now faces a permanent headwind. Each rise in price will be capped by a surge in US output. The only constraint is the scale of US reserves that can be extracted at mid-cost, and these may be bigger than originally supposed, not to mention the parallel possibilities in Argentina and Australia, or the possibility for "clean fracking" in China as plasma pulse technology cuts water needs.

Mr Sheffield said the Permian Basin in Texas could alone produce 5-6m b/d in the long-term, more than Saudi Arabia's giant Ghawar field, the biggest in the world.

Saudi Arabia is effectively beached. It relies on oil for 90pc of its budget revenues. There is no other industry to speak of, a full fifty years after the oil bonanza began.

Citizens pay no tax on income, interest, or stock dividends. Subsidized petrol costs twelve cents a litre at the pump. Electricity is given away for 1.3 cents a kilowatt-hour. Spending on patronage exploded after the Arab Spring as the kingdom sought to smother dissent.

The International Monetary Fund estimates that the budget deficit will reach 20pc of GDP this year, or roughly $140bn. The 'fiscal break-even price' is $106.

Far from retrenching, King Salman is spraying money around, giving away $32bn in a coronation bonus for all workers and pensioners.

He has launched a costly war against the Houthis in Yemen and is engaged in a massive military build-up - entirely reliant on imported weapons - that will propel Saudi Arabia to fifth place in the world defence ranking.

The Saudi royal family is leading the Sunni cause against a resurgent Iran, battling for dominance in a bitter struggle between Sunni and Shia across the Middle East. "Right now, the Saudis have only one thing on their mind and that is the Iranians. They have a very serious problem. Iranian proxies are running Yemen, Syria, Iraq, and Lebanon," said Jim Woolsey, the former head of the US Central Intelligence Agency.

Money began to leak out of Saudi Arabia after the Arab Spring, with net capital outflows reaching 8pc of GDP annually even before the oil price crash. The country has since been burning through its foreign reserves at a vertiginous pace.

The reserves peaked at $737bn in August of 2014. They dropped to $672 in May. At current prices they are falling by at least $12bn a month.

Khalid Alsweilem, a former official at the Saudi central bank and now at Harvard University, said the fiscal deficit must be covered almost dollar for dollar by drawing down reserves.

The Saudi buffer is not particularly large given the country's fixed exchange system. Kuwait, Qatar, and Abu Dhabi all have three times greater reserves per capita. "We are much more vulnerable. That is why we are the fourth rated sovereign in the Gulf at AA-. We cannot afford to lose our cushion over the next two years," he said.

Standard & Poor's lowered its outlook to "negative" in February. "We view Saudi Arabia's economy as undiversified and vulnerable to a steep and sustained decline in oil prices," it said.

Mr Alsweilem wrote in a Harvard report that Saudi Arabia would have an extra trillion of assets by now if it had adopted the Norwegian model of a sovereign wealth fund to recyle the money instead of treating it as a piggy bank for the finance ministry. The report has caused storm in Riyadh.

"We were lucky before because the oil price recovered in time. But we can't count on that again," he said.

OPEC have left matters too late, though perhaps there is little they could have done to combat the advances of American technology.

In hindsight, it was a strategic error to hold prices so high, for so long, allowing shale frackers - and the solar industry - to come of age. The genie cannot be put back in the bottle.

The Saudis are now trapped. Even if they could do a deal with Russia and orchestrate a cut in output to boost prices - far from clear - they might merely gain a few more years of high income at the cost of bringing forward more shale production later on.

Yet on the current course their reserves may be down to $200bn by the end of 2018. The markets will react long before this, seeing the writing on the wall. Capital flight will accelerate.

The government can slash investment spending for a while - as it did in the mid-1980s - but in the end it must face draconian austerity. It cannot afford to prop up Egypt and maintain an exorbitant political patronage machine across the Sunni world.

Social spending is the glue that holds together a medieval Wahhabi regime at a time of fermenting unrest among the Shia minority of the Eastern Province, pin-prick terrorist attacks from ISIS, and blowback from the invasion of Yemen.

Diplomatic spending is what underpins the Saudi sphere of influence in a Middle East suffering its own version of Europe's Thirty Year War, and still reeling from the after-shocks of a crushed democratic revolt.

We may yet find that the US oil industry has greater staying power than the rickety political edifice behind OPEC.

Read the whole story
jordanbrock
993 days ago
reply
Perth, Western Australia
Share this story
Delete

My experience with Minitest and RSpec

1 Comment

I’ve been using RSpec in earnest for the past 6 months now, so I thought it’s time to write a blurrrgh poast comparing RSpec with Minitest. I’ve used Minitest for years, and RSpec only for 6 months, so please keep that in mind when reading!

PLEASE REMEMBER, I don’t care what test framework you use, as long as you are testing your code. This is a post just about my experience with these two frameworks. In other words, this is an opinion piece.

INTRO!!!

I really believe that all test frameworks are essentially the same. No test framework can do something that’s impossible for another to do. It’s just code. So what differentiates test frameworks? I would say the main difference would be user interface. So I’m really going to compare user interfaces between these frameworks.

Things I like about RSpec.

By far and away, my favorite thing about RSpec is that if there is a failure, it prints how to run just that one test at the bottom of the output. I can easily copy and paste that line and run just the one test. For people who don’t know, here is an example:

describe "something" do
  it "works" do
    expect(10).to equal(11)
  end

  it "really works" do
    expect(11).to equal(11)
  end
end

When you run this, the output looks like this:

[aaron@TC tlm.com (master)]$ rspec code/fail_spec.rb 
F.

Failures:

  1) something works
     Failure/Error: expect(10).to eq(11)
       
       expected: 11
            got: 10
       
       (compared using ==)
     # ./code/fail_spec.rb:3:in `block (2 levels) in <top (required)>'

Finished in 0.00504 seconds (files took 0.20501 seconds to load)
2 examples, 1 failure

Failed examples:

rspec ./code/fail_spec.rb:2 # something works
[aaron@TC tlm.com (master)]$ 

All you have to do to rerun just the one failing spec is to copy and paste that one line like this:

rerun demo

I don’t have to think or type, I just “copy, paste, run”. I like to think of this as a “learn as you play” feature.

The other thing I like about RSpec is that it ships with a colored output formatter, so if you do rspec --color, you’ll get colored output. I’ve used Minitest for years without colored output, but I’ve come to really like the colored output from RSpec. It helps me quickly see the most important parts of the test output, the assertion failure, and stack traces (though I highly suspect that the RSpec core team all use black backgrounds in their terminals because sometimes the colors aren’t so nice on my white terminal).

Things I like about Minitest

The main thing that I like about Minitest is that a Minitest test is just a Ruby class. Here is an example test similar to the RSpec sample I showed earlier:

require 'minitest/autorun'

class Something < Minitest::Test
  def test_works
    assert_equal 11, 10
  end

  def test_really_works
    assert_equal 11, 11
  end
end

I like this because I know exactly where the test_works method is defined. It’s no different than any other class in Ruby, so I don’t have to learn anything new. I like it because I am a heavy user of CTags, so I can easily jump to test methods or classes inside my editor. Another thing that’s nice about using regular Ruby classes is that when I need to refactor my tests, I just use my normal refactoring skills: I extract methods, classes, modules, change to inheritance, etc. I use the same refactoring techniques on my test files as I do on my library files. I think that is where Minitest really shines.

Things I dislike about RSpec

RSpec is a DSL for writing tests. I think this is probably RSpec’s largest weakness. I am a programmer, I can read code, so I don’t particularly care whether or not my test code “reads like English”. I don’t understand the value of the DSL, especially when I have a nearly 4000 line specfile that I’d like to refactor. How do I go about refactoring? I can extract methods:

describe "something" do
  def helper
    11
  end

  it "works" do
    expect(10).to eq(helper)
  end

  it "really works" do
    expect(11).to eq(helper)
  end
end

But where is the helper method defined? What’s its visibility? Can I put it in a module? Can I use inheritance? Who can call it? Can I call super from the extracted method? If so, where does super go? These are not the types of questions I want to be pondering when I have 3000 test failures and really long spec files to read through. My mind spins off in to thoughts like “I wonder how RSpec works?”, and “I wonder what my cat is doing?”

From what I can gather, calling describe in RSpec essentially defines a class. But if that’s the case, why not just use Ruby classes? Then I don’t need to guess about method visibility, modules, inheritance, etc. Not to mention, the library code that I’m working with is just using Ruby classes. Why do I need to switch to some other language for testing?

Nesting a describe seems to perform inheritance, but only for certain things like before blocks. If you run this code:

describe "something" do
  before do
    puts "hi!"
  end

  it "works" do
    expect(10).to eq(helper)
  end

  it "really works" do
    expect(11).to eq(helper)
  end

  context "another thing" do
    before do
      puts "hello!"
    end

    it "really really works" do
      expect(11).to eq(helper)
    end
  end

  def helper
    11
  end
end

You’ll see “hi!” printed 3 times, once for each it, and “hello!” printed once. For the nested context, I would like to print “hello!” before it prints “hi!”. In a normal inheritance situation, I would change the call to super. I am not sure how to do what I just described without learning a new thing (I think I would need let but I don’t know). For now, I’m coping with this by refactoring to classes outside of the specs themselves, then calling the objects from the specs. Essentially “composition” in my tests.

Another thing that bugs me is that if I do try to refactor my RSpec tests, and I change any lines, then the line that I copy and pasted to run just the one test won’t work anymore. I have to figure out the new line. I can use the name of the test by specifying the -e flag on RSpec, but then I lose the “copy, paste, run” feature that I love so much.

Anyway, I will stop picking on RSpec now. To me, RSpec seems to have some sort of identity crisis and is caught somewhere between “a language for writing tests” and “just Ruby”. That is RSpec’s biggest weakness.

Things I dislike about Minitest

If RSpec does one thing better than Minitest, I would say that the command line UI easily outshines Minitest. Here is one example.

I can run one test at a time like so:

$ ruby code/fail_test.rb -n Something#test_works

This will run the test_works method on the Something class. The problem for me is that it’s not clear to do that when you see the failing test output. If we run the whole suite, the output looks like this:

[aaron@TC tlm.com (master)]$ ruby code/fail_test.rb 
Run options: --seed 5990

# Running:

.F

Finished in 0.002047s, 977.0396 runs/s, 977.0396 assertions/s.

  1) Failure:
Something#test_works [code/fail_test.rb:5]:
Expected: 11
  Actual: 10

2 runs, 2 assertions, 1 failures, 0 errors, 0 skips
[aaron@TC tlm.com (master)]$

Looking at this, how would you know how to run just that one test? With RSpec, it’s no problem. I was able to learn how to run just one test the first time I ever used RSpec. I didn’t read any docs, just ran the tests, and the info was right there. Coming from RSpec, you might need to think you could do this:

$ ruby code/fail_test.rb:5

But of course that doesn’t work because you’re just using Ruby on the command line.

Here is a short video of me running the single test:

demo

The disadvantages of this over RSpec’s output is I have to type a few characters and know a commandline interface in advance. You might think “it’s just a few characters”, but every time I have to type something is a potential for a mistake that I’ll have to correct, which takes even more time. I really think the advantages of “copy, paste, run” can’t be understated. (Yes, I know there are tools like autotest for both Minitest and RSpec that will run tests for you, but sometimes I can’t / don’t use them)

The other thing I wish Minitest would do is to ship with a color formatter like RSpec does. I am used to the color output from RSpec, and I don’t really want to go back. It really helps me focus on what’s important about my test failures.

Conclusion

Both of these frameworks have things I like and dislike. Being able to reuse my debugging and refactoring skills in my tests is pretty important to me, especially since I deal with lots of legacy code. This is why I’ll stick with Minitest in my personal projects. However, I am sure I will get better at refactoring and debugging in RSpec tests, and when I get better at it, I will share what I learn.

Now, do I care which one you use? No. As long as you test your code, I am happy. A professional developer should be able to work in either one of these because they essentially do the same thing: test your code.

Read the whole story
jordanbrock
1186 days ago
reply
"Do I care which in you use? No."
Perth, Western Australia
Share this story
Delete

How Software Works

1 Comment and 4 Shares

Here's a lesson in how software development works.

Say you'd like to port a popular arcade game to your home video console. You can give a guy like Tod Frye four months to do a good-enough version of Pac-Man. It'll sell 7 million copies, even though it looks like this:

Pac-Man 2600

Or, you can wait for 30 years of refinement and improvement in understanding of Atari software development, give someone three years to develop their own version of Pac-Man and end up with a near-flawless clone of the arcade original.

It will sell zero million copies.

Read the whole story
jordanbrock
1186 days ago
reply
I played the hell out of the Atari Pac-Man. I'd never played the arcade version (small town with only 2 game cabinets to play on) so my memories of the game are of beige dashes :)
Perth, Western Australia
Share this story
Delete

Photo

1 Comment and 2 Shares


Read the whole story
jordanbrock
1189 days ago
reply
eggcellent
Perth, Western Australia
Share this story
Delete
Next Page of Stories