Skip to main content

Posts

Showing posts from December, 2007

Scala: first impressions

I'm reading the prerelease of the Scala book , since I'm working for a heavily Java-invested organization now and programming in Java feels like running a race with cement shoes. Politically, Jython doesn't seem like an option; Scala might be an easier sell. Here's some of my impressions going through the book. Scala is a decent scripting language [updated this section thanks to comments from anonymous, Jörn, and Eric.] Here's how you can loop through each line in a file: Python: import sys for line in open(sys.argv[0]): print line Scala: import scala.io.Source Source.fromFile(args(0)).getLines.foreach(println) The scala interpreter also has a REPL , which is nice for experimenting. This article has more examples of basic scripting in scala. Getters and setters One thing I despise in Java is the huge amount of wasted lines of code dedicated to getFoo and setFoo methods. Sure, your IDE can autogenerate thes...

Troubleshooting the ps3 wireless network connection, including error 80130128

My father got a ps3 for Christmas, but ran into some problems getting it on his wireless network. The first one was "connection error 80130128" after configuring it to use DHCP. I couldn't google anything useful about this; just a few other hapless victims asking if anyone had any ideas. Fortunately Dad had his laptop there too and noticed Windows complaining that two machines on the network were both using the same IP. So, over the phone, I walked him through setting up the ps3 with a static address: on his laptop, run -> cmd ipconfig Read the "gateway" ip. Put that into his browser to go to his router's admin page Find the DHCP settings for his router to see what range of IPs it hands out; pick one outside that range Set up the ps3 with that IP, the router IP as primary dns, and an opendns server as secondary This made the connection test happy. But when he tried to go to the playstation store, it gave a DNS error. If he repeated the connection te...