Macbook Pro Upgrades, Bags and Accessories
Posted on March 11, 2008
Leave a Comment
So with the almost $600 savings I got with getting a refurb previous gen MBP model I decided to get some niceties to accompany my new best friend:
4GB Macbook Pro Ram
$97 including shipping from Newegg.com. Simply the best thing you can do to increase performance. I got 2 of these and they’ve been working great: http://www.newegg.com/product/product.aspx?Item=N82E16820208323
Booq Bag Vyper XM Ballistic Nylon Sleeve
$49 – http://www.booqbags.com/s.nl/it.A/id.74/.f?sc=13&category=-113. I’ve been using it for a few days and it is really solid. Fits very snug and the laptop is well protected in it. Will prevent damage from much harding impacts as it isn’t soft neoprene but instead is semi-rigid ballistic woven nylon. Booq bag is just the top quality when it comes to laptop cases and bags.
Some pics: http://www.flickr.com/photos/malffred/2324468959/
mStand All Aluminum MBP Stand
$49 – http://www.raindesigninc.com/mstand.html – If you’re working on a laptop for more than a few hours a day, a laptop stand is something you should really invest in. I chose the mStand form RainDesign simply because it is beautiful and matches the MBP perfectly. It also acts as to improve ergonomics by raising the screen to eye-level (6 inches) and helps to dissipate heat with its all aluminum design acting like a heat-sink. I picked mine up off Amazon.
Booq or InCase backpack
$89-$215 – Verdict is still out on this as I’m still deciding. But i’ll need a new bag for my MBP. I’ve just been using a regular backpack and throwing my MBP in it with the Vyper sleeve. I’ve always been 100% Booq, but the InCase style is growing on me (I really didn’t like it at first). I’ve got it down to 3 choices:
- Booq Bag Mamba Backpack – http://www.booqbags.com/s.nl/it.A/id.285/.f?sc=11&category=-111
- InCase Slim Nylon Backpack – http://www.goincase.com/products/detail/nylon-slim-backpack-cl55028
- Booq Bag Boa 3 Backpack – http://www.booqbags.com/s.nl/it.A/id.297/.f?sc=11&category=-111
While Sling bags look better, I’ve had a lot on the past and they really do a number on your back/spine after extended use (Any doctor will confirm this). I want the bag to be slim but also good as a day pack for outings wherever.
My initial urge was the Booq Bag Boa 2 but it is not in production anymore, so I thought about the Boa 3 that just came out. Looking at it though, it is a SERIOUS bag and quite heavy at that (4.4lbs). While it would be great for traveling and airplanes, I don’t think it is something I’d want for a light day pack.
Next up was the Booq Mamba Backpack, I’ve had a Mamba sling in the past and it was top quality. But when comparing it with the InCase Slim Backpack it just looks a little dull (Even though the InCase bag is as square as can be). So after all the research thus far I’m leaning towards the InCase bag which is $89. I’ll be checking it out in person at the Apple Store to make a final decision.
Tags: 4GB Transcend SO-DIMM, Booq Bag, Booq Bag Vyper M2 Sleeve, InCase Slim Nylon Backpack, Macbook Pro Upgrade, mStand, NewEgg.com, RainDesign.
Posted on March 11, 2008
Filed Under Apple, Art & Design, Hardware, Mobile Tech, Productivity, Tech, Travel
Macbook Pro 2.2Ghz Santa Rosa Review
Posted on March 10, 2008
Leave a Comment
Having worked and played on my new MBP SR for a bit over a week this is what I’ve experienced so far.
Why Santa Rosa and not Penryn
The release of the new Penryn was actually what set off this purchase and what I (and a lot of others) had been waiting for. Unfortunately it wasn’t the MBP upgrade I was hoping for though it was quite nice upgrade in general.
After lots of googling and research I just found that I probably would not be using the added features in the new revisions. The touchpad with iPhone gestures is neat and all, but I most likely wouldn’t be using them as 80% of the time the MBP will be my desktop replacement and sitting on a laptop stand (The new mStand).
Along the same lines, the Penryn is supposed to run cooler and give better battery life but then again it’ll be on my desk 80% of the time and plugged in. Heat won’t really been an issue (and hasn’t thus far, see below) and the battery life I do get out of it is more than enough.
Other than that the new Penryns have 256MB VRAM standard and bigger hard drives. 128MB would suite my needs just fine and 120GB has been fine for me as well.
To top it all off, the new base model is $1999 and the deal in the Apple Store refurb section for a 2.2Ghz is $1449. DAMN! With that money savings I decided to max out the Ram to 4GB and get some sweet accessories like a quality bag, sleeve, laptop stand, USB hub etc.
Specs and Performance
I got a stellar deal I just couldn’t pass up in the apple store refurb section. It has:
- 2.2Ghz Core 2 Duo (Santa Rosa)
- 4GB RAM (I maxed it out. Have 2×1GB SODIMM’s for sale)
- 120GB 5400RPM HD
- 15’4” Glossy display. LCD Backlit
- Nvidia GeForce 8600M GT w/ 128MB VRAM
- 8x Dual-Layer Superdrive
- Wifi, Bluetooth, Apple Remote, iSight etc
- 1 x FW800, 1x FW400, 2x USB 2.0, Gigabit Ethernet
Of course since moving from a 1.33Ghz G4 to a 2.2Ghz C2D the performance has been amazing.
But in a better comparison, I do have a 24” 2.16Ghz C2D iMac at home and this laptop does feel as fast if not faster than the iMac. Both are running 10.5 Leopard but the iMac has a 7200RPM harddrive.
I run about 9 spaces desktops each filled up with windows and applications. Even doing everything I need to do and having every application I need open, There is usually 75-80% CPU idle and at max I usually have 1GB Ram free. The ample 4GB of RAM definitely makes a HUGE difference and is something I recommend anyone do with any mac, max out the RAM. I got 2×2GB sticks for $100 w/ shipping from Newegg.
At any given time I have the following open on one of my 9 spaces:
- Camino (2 Windows, 10 tabs each. More than 10 it bleeds memory)
- Safari (1 Window, 10-15 tabs)
- Flock (1 Window, 10-15 tabs. Hey, I do a lot of web surfing
) - 10-15 Terminal windows
- Textmate
- iTunes
- CoverSutra
- YoJimbo
- NetBeans 6
- Activity Monitor
- Transmission
- Transmit
- OmniGraffle
- SpeedDownloader
- Things
- Skype
- Preview
- VMWare Fusion. Win XP SP2 Install
Display and Graphics
I would have to say the screen, besides the overall build quality and design, is the most stunning thing about the MBP. The clarity, depth and richness of the screen and the colors I’ve never seen before.
I’m glad I went Glossy instead of Matte, but in general this is a heated topic and you’ll find a different answer from anyone you ask. I can say I see no glare issues and the benefit of having richer and deeper colors is much more worth it in my opinion. Coming from the G4 display it can be nothing except an improvement
The 128MB Nvidia graphics are working great and it has been able to run everything I’ve thrown at it with ease. Though I should say I’m no hardcore gamer and havn’t really tested any heavy games on it. Though since I’ll be replacing my iMac with the MBP and setting up an external display, I’ll see how well it can power a 20” Dell Widescreen over DVI.
Hard Drive
I’ve loaded pretty much everything I can think of on it as well as put my 25GB iTunes library and 10GB iPhoto library on the built in HD and still have 30GB left. It has been more than enough but I do plan on getting a external 500GB RAID enclosure (Choosing between the NewerTech Guardian Maximus and the Lacie 2big Triple) for backups, selected time capsule backups and superduper images.
The speed of the 5400RPM drive has been fine as well, no noticeable lag but then again I never do any swapping as many things are in the 4GB memory.
Heat, Power and Battery Life
I’ve heard a lot about this regarding the MBP’s and a lot of people have complained. But I’ve found it really isn’t that big of a deal unless your converting SD video and having it sit on your bare-skin lap.
Doing non-intensive tasks, the internal temp runs around 40-50C and the aluminum is warm to the touch on the top-back and bottom-back of the laptop. But seriously it was just as warm with my 12” powerbook.
Then one day I was converting a few GB video’s and met with the devils rage and fiery fury. It did get quite hot with internal temps reaching 80-90c and the same area’s of the laptop were quite hot to the touch. Again, same thing would happen with my G4 though. During the video conversion it was only using about 100% of 1 core as well with no noticeable lag to the other 9 spaces screens or any applications I had running.
I haven’t fully tested the battery yet, but it does last a lot longer than the PB G4. I’ve gotten it down to 20% and had been using it just for wifi web browsing for about 3 hours. So I suppose I could get 3 1/2 – 4hrs out of it under normal use and adjusted brightness settings (the LCD can get REALLY bright).
I should also mention that the MBP is very quite and even under load the fan doesn’t get annoyingly loud (which is what happened in my PB G4)
Design and Quality
What do I really need to say here, it is a product form Cupertino. All-in-all, the thing is just stunning. The design, the aluminum, the keyboard and display all combine synergistically together. It really is a work of art.
Other Niceties
The ambient keyboard backlight comes in very handy during low-light situation and serves its purpose nicely. The built in iSight is a must I would say in this day and age and is something I’ve just become used to.
The speakers on it provide pretty good sound but what I found exceptionally good was the digital sound input/outputs and whatever amplification they used. When listening to music on headphones or earbuds, the sounds is exceptionally crisp, clear and loud.
Verdict and Comments
So yeah, overall I couldn’t be happier in this investment. I give it a solid 9 out of 10 if I were to use that measurement system.
I do wish however that it had come with more USB ports, it comes with 2 (which is what my PB G4 had) but 3 would be nice on a 15” laptop (The 17” comes with 3.). Not a big deal, I’ve already ordered a USB 2.0 Hub.
If I had to order again I would have probably gotten the 2.4Ghz model w/ 256MB Nvidia Card and 160GB HD for $1649 but at the time of order it wasn’t available. It showed up again the next day and I did try to switch at the last minute but they told me it was already packaged. Ah well, not a big deal.
So if you’re in the market for a new laptop and don’t need any of the special features in the new Penryn models, definitely pick up a late 2007 Santa Rosa if you get the chance.
Tags: Apple, Apple Review, Macbook Pro Review, Macbook Pro SR, MBP Review, MBP Santa Rosa, MBP SR.
Posted on March 10, 2008
Filed Under Apple, Art & Design, Hardware, Productivity, Startup, Tech, Travel
Upgrades and Updates - New Macbook Pro Santa Rosa
Posted on March 2, 2008
Leave a Comment
With the announcement of the new Macbook Pro’s I saw it as a great time to upgrade from my trusty 5 year old 12” 1.33Ghz Powerbook.
My first impressions are: “WOW”. But really, what other reaction can I have coming from a Powerbook?
Basic specs:
- 2.2Ghz Santa Rose (Previous Gen) Core 2 Duo
- 4GB Ram (OH YEAH!)
- 120GB HD
- 128MB Nvidia GeForce 8600M GT
- 15.4” Glossy Display (Sooo glad I didn’t go Matte…)
I’m still loading it up and being download happy but from my initial usage there are no downsides at all. After I’m done setting everything up and get a few more days of usage under my belt I’ll post a more thorough review.
Tags: MacbookPro, Macbook Pro, Apple, OS X 10.5 Leopard,
Tags: 4GB Ram, Macbook, Macbook Pro, Macbook Pro Santa Rosa, New Laptop, OS X 10.5 Leopard.
Posted on March 2, 2008
Filed Under Apple, Business, Hardware, Productivity, Tech, WebDev
OS X Leopard Install Success!
Posted on November 3, 2007
Leave a Comment
OS X Leopard Install Success!, originally uploaded by Marston A..
Ok, just like everyone else now I too have had the joy of using Leopard.
My initial impressions:
- Wish I could have done a clean install.
- Some things were buggy, which is most likely from old software I’ve been using.
- Install was fairly quick, did an archive and install. 30min or so.
- Spent a long time adding things to the TimeMachine “Exception” list. This is mainly due to it conflicting with my old “backup scheme.” Still have to figure this out.
- Have it installed on my 24” iMac w/ 2.16Gzh Core2Duo. Still have to test on 1.33Ghz G4 Powerbook.
What I love so far:
- The unified interface.
- Space – YES YES YES! Much better than VirtueDesktop. Everything I could want in a multiple desktop app/os.
- Much better memory and CPU management.
- Despite what everyone else says, I like the doc and transparent menubar.
- Faster and snappier than Tiger.
- Quick Look is VERY handy indeed.
- A million under the hood improvements.
Overall a great upgrade, I would say a must for everyone who has a mac now.
Tags: Apple, iMac, Leopard Review, OS X, OS X 10.5, OS X Leopard, Powerbook.
Posted on November 3, 2007
Filed Under Apple, Business, Daily Thoughts, Tech
RailsConf Europe 2007 Berlin Session Notes
Posted on September 23, 2007
Leave a Comment
marston@marstononline.com
Here are my various notes from the RailsConf sessions. You’ll have to excuse me as they aren’t the best notes in the world
Most are incoherent and I typed them quickly. If you want I also put them all in a PDF for download.
Re-Factoring Rails Notes:
By Trotter Cashion (cashion@gmail.com)
- rCov – Test Coverage
- gem install –y rcov
- rcov test/unit/*.rb test/functional/*.rb
- Standard Rails Test Generation doesn’t cover all code, don’t trust it.
- Nearly impossible to re-factor if you don’t have good tests.
- Try to get as much test coverage of your app as possible.
- Clean code makes it really easy to cache information and variables
- We don’t re-factor because of deadlines – You have to say “No, it isn’t ready yet.”
- Explain it to managers in a business sense/scenario.
- People don’t re-factor because they don’t write tests
- What to not re-factor?
- When adding new features? (in the initial moment when adding the feature. Re-Factor AFTER the tests pass and it works then re-factor.
- When Killing Bugs.
- What tools do you need?
- Use rCov (test coverage gem) – Tells you what percentage of your code that your tests are covering and which percentage it isn’t. i.e: 19% of your helpers aren’t being tested.
- Use auto test tools (ZenTest/AutoTest) – Runs tests for you all the time.
- Use grep? (Textmate can do project wide search).
- SpiderTest – Spiders your views, clicks on links. If something fails you will know. Great for view testing.
- Selenium – Like SpiderTools for view testing.
- Use before_filters everywhere, make things simpler and better.
- Though if the before_filter only applies to one method, move it into the method.
- CRUD Re-Factoring:
- Test, Make Test Break, Test the Method.
- Common naming: test_new, test_create, test_destroy, test_update
- Don’t use “pubsh_with_attributes” Depricated. Used to be used with has_and_belongs_to_many
- Remember YAGNI (You ain’t gonna need it). You think you’ll need it, but you really don’t.
- Basic 4 rules for re-factoring:
- Move attributes and associations – When an attribute is being used more by another class. Many times, the need to load the current class just to retrieve this one attribute is a drain on performance. Removing/Moving associations removes middleman and costly joins.
- Move Methods (in models) – When a method uses more attributes from a different class than it does from its defining class.
- Move Methods (in controllers) – When the method uses objects/attributes typically governed by another controller.
Scaling a Rails Application Notes:
- Questions like: How scale from 1 DC to multiple Data centers across the globe and still maintain a unified back-end and only have my costs multiple by 1x per DC.
- Slingshot about making a Rails app an offline desktop app.
- TextDrive deploys 10 new servers every 2-4 days.
- “Scalability” independent of “performance”. Things can be slow and still scale.
- Rules of Ten:
- Tiers are different functionally
- Tiers should be 10x different in throughput
- Infrastructure costs <= 10% of “revenue”
- Web Apps are stateless – Of course.
- Inherently “scalable”
- LB -> App -> Back-end
- Types of Scalability:
- Load – If I have 1 thing that is 100% utilized, if I add 9 more then I should have 10 things that are 10% utilized
- Geographic – Can I separate things across the world and have it scale to each in a balanced way.
- Administrative – Most expensive, as we scale hardware/software can I scale the people needed to maintain them in a cost effective manner.
- How many servers fit into 100kw? Around 250-400 servers.
- 1Gbps = 125MB/s, 100Mbps = 12.5MB/s
- 100Mbps usually around $5000-$8000/month. ($50-$80 per MB per Second)
- BigIP’s can do 20k-100k RPS easy. Apache, Lighty or LSWS can do 1k-15k proxy static request/s
- Google spends 10% of their revenue on server/hardware/infrastructure. That includes CC processing charges. $307 million in 2006.
- I.E: if you’re making $1 million a year, you should be spending $100,000/yr on infrastructure.
- Joyent builds in racks of 3 with a 4th admin app. 1 is app rack, storage rack and multi-core rack for processing heavy things.
- Keep things standardized, simple and use open technologies.
- You need to understand what a given “component” can do at a minimum and maximum (i.e a single server, a single VPS, a single proxy)
- It is generally cheaper at the $20-30k/month spending range to do hosting “in-house” i.e buy your own hardware etc, collocate. Assuming you have a good network admin and know what you’re doing.
- Joyent used to do all their hosting at “The Planet”. Had problems, bad data centers. “It looks like a robot vomited.”
- If you run your own hardware, keep one kind of:
- Console server
- Switch
- Server
- CPU
- RAM
- Storage
- Disc
- OS
- Interconnect
- Powerplug
- Powerstrip
- Color code cabling
- They had SAN, got rid of it for ZFS.
- People don’t know how to scale DB’s and don’t know how to store files.
- Level 3 and Equinx good tier1 providers.
- Typical costs:
- $500-$750 for a rack
- $500-1k for power per rack
- $1k for bandwidth
- $4k for systems
- A great sysadmin/racker is $100k+ (hah!)
- $6500 for 20 systems in a rack on a lease.
- What do you run on servers? VIRTUALIZE!! (Xen, VMware, Solaris Zones)
- VMWare is around $2k per server. Better for “Administrative Scalability”.
- Do you “get” linear performance? Typically no, usually take a 10-20% performance hit. Things are getting better.
- Lessons learned:
- Write separate apps that do one thing and talk to each other via web services.
- Typical Server Setup:
- 1x – 16GB, 4 Core AMD Box
- 4 VPS’
- 10 Mongrels per CPU/Core (10 per CPU)
- Scale Process:
- Run more and more processes
- They should add up, in the front and in the back. Should add up linearly.
- In Front: Load Balancers (Hardware). In Back: DB Middleware (Sequoia)
- DNS Federation: Easy way to split users into pods. User.dns.com instead of dns.com/user
- BingoDisk does this. Use PDNS (Power DNS). Run on FreeBSD. MySQL Backend. Master/Slace MySQL instead of Master/Slave PDNS.
- Joyent uses “predictive” on Mongrels.
- Layer7 Load Balancing is great. Separate mongrels for different parts of app. i.e: signup/login pages served faster.
- Wordpress.com does DNS Federation.
- When doing stress testing, use ab or httperf. Us against ONE mongrel. Base it off that. Then try against 10. Base your LB against that.
- Software Load Balancers:
- Varnish – 10k RPS
- BigIP: 100k RPS
- Nginx/LSWS: 1k RPS
- HA Proxy: ?
- Varnish also does caching. On some apps, server 80-90% of requests from cache, good like squid.
- Varnish has VCL language too. Makes it easy to config via web services. Purge cache from web service for example. Easy to purge cache via Rails app.
- Nginx: Good for LB + Static Content.
- Nginx -> Mongrel -> MySQL = 1k RPS Easy
- Vanish -> Nginx -> Mongrel -> MySQL = 10k RPS w/ Varnish Cache to server lots of requests.
- Use “Browser Pipelining” via several static servers with different domain names.
- BingoDisk not so good for small asset storing/serving. 2GB uplink. Good for large files.
- Offload static content to CDN at the 20k/rps area.
- Memcache helps you “deal” with Scalability in the backend.
- Use Squoia as a DB middleman for DB replication. Makes MySQL DB dumb. “RAIDED Databases.” You can program DB sharding with it.
- Nginx/LSWS good up to 1000 RPS, then Hardware Load Balancers are needed.
- Static server naming: (assets1-4.domain.com, assets5-8.domain.com)
ActiveRecord and SDO Notes:
- SDO and AR are similar
- Allows developers to focus on things that are useful.
- SCA’s are like SDO but include encryption, auth etc
- SDO = Service Data Objects
- SCA = Service Control Architecture
- Boring… Leaving.
Talks with EngineYard:
- Switched from CoyotePoint LoadBalancers to using LVS Open-source project. Much more flexible.
- CoyotePoint just couldn’t keep up with their specific setup. Thousands of static IP’s pointing to many clusters. It just wasn’t what they were setup for.
- MySQL Setup is Amazing. 4 Sata HD’s per server dedicated to MySQL. 2x in RAID1 for Master, 2x RAID1 for Slave. Then syncs to bigger replication slices.
- 3GB MySQL Slices, also have 6GB Slices and dedicated slices/servers for bigger sites. Also backups go to SAN.
- Uses GFS with the CoRaid SAN’s.
- CoRaid has 16 and 24 drive SAN’s. 10Gbps Ethernet connections. AOE: Ethernet without the TCP overhead. Uses standard SATA drives, want more stored? Just add more disks. They have MANY CoRaid’s in their racks.
- 6×1Gbps Ethernet ports per server.
- 2x (2Gbps) dedicated to SAN Storage per server.
- Dedicated, redundant servers for Mail, DNS and SVN also
- eXtreme Networks Super High performance Switches in between servers and SAN.
- Use Cacti / Nagios for Monitoring. Also Monit.
- Custom Gentoo Setup for Application Slices. 640MB each, ONLY for mongrels. Bare-Bones setup just enough to serve the app. 4 x Mongrels per slice. Event-driven if needed. 100% utilization of 1 core. Usually 8 or 16 core CPU’s per server.
- 2 production slices (Load Balanced) can easily do 80RPS (4.5 Million DYNAMIC requests per day). Static files quickly served by Nginx.
- Redundant, Dual Switched Servers.
- Dual Network Connections to Public Internet
- Dual/Redundant Everything
Really Scaling Rails, A lesson with Twitter Notes:
- Setup:
- Big IP -> Apache mod_proxy_balancer -> Hundreds of Mongrels -> A big ass MySQL DB
- They setup mod_proxy to send only 1 request at a time to mongrels
- If all their mongrels are taken users get an error page. (usually not good). At some point you’ll have scaled out to know how many request you can get and have enough mongrels to serve that volumn.
- They use Benchmark.measure to calculate the runtime for any action.
- The show_runtime shows the amount of time spent in DB, time spent in rendering etc.
- Shows an HTML comment at the end of each Twitter page. Easy to narrow bottlenecks.
- Never over-architect. Easy to want to tackle scaling problems early when they don’t matter.
- You need a community first in order to scale.
- You need to abstract long running processes to Daemons.
- Use Queuing to send instructions from Mongrel to Daemon.
- They wrote a distributed queuing system called “Starling”:
- Speaks to memcache language
- Transactional playback
- Fast, simple, 100% pure ruby
- They might release it (Twitter). Hope to open-source it within the month (Oct 2007)
- DB 101:
- Index everything you query on (if there is a WHERE)
- Avoid complex joins
- Cache Cache Cache
- Use Monit to kill processes if they get too big.
- Scale where it matters, obviously. Find where the users need to spend their time.
- They use Munin, Nagios. They loves graphs, graphs are great.
- Use the community. Create and API
- They use EDGE Rails (using Piston).
- Memcache roundtrip time is about 20ms.
- Actively expire memcache, not general sweepers.
- They use pure Ruby mem-cache. No fragment caching.
- No DB Connection Pooling
- 1 Big master DB. 3 slaves: 1 slave for SolR Search, 1 for stats aggregations. 1 for hot-backup.
- About to partition their DB into shards based on content.
Rubinus Notes:
- Is a Virtual Machine.
- Brand new code base. Written in C/Ruby. No patches.
- Nov 3: 1.0 preview. End of 2007 1.0
- Fairly backwards-compatible.
- Much better memory usage. Works to relieve memory leak pain. Garbage collector is new and very simple.
- Addresses the forking problem. i.e: Having lots of Mongrel processes. Handles children better.
- Works with the OS so that forked children share data.
- Rubinus doesn’t run Mongrel yet.
- You can pre-compile your projects. Somewhat obfuscate code.
- Doesn’t use any existing Ruby 1.8 code.
- When Ruby 1.9 comes out, they’ll be able to commit in a majority of the features.
- Improves on Error Reporting. – Very flexible. Completely override backtrace.
- Leaves the door open for many performance improvements after 1.0. inline-caching, pre-compiling code, JIT (eventually) etc.
- When C-extensions misbehave it brings the whole Ruby VM down.
- Improves on Profiles to do performance testing of Ruby/Rails apps. In Ruby 1.8 it gives a big performance hit.
- In Rubinius they built in a sampling profiler and has little performance hit. Almost no impact on runtime.
- Rubinus vs Yarv (Ruby 1.9): trying to avoid this. BUT… Not much progression with YARV. Been promised for 3 years now.
- JRuby share the same RSpecs. IronRuby doesn’t to their knowledge. Yarv isn’t either to their knowledge.
- Communicating with Ruby Core is VERY difficult.
- Rubinius is faster now in MRI in many micro-benchmarks.
- They have no windows developers yet, actively seeking. (ephoenix@engineyard.com)
- You can run multiple VM’s in the same process.
- You can embed it fairly easy. No shared data in the C part of it.
- Currently has a green thread model.
- You have access to low-level syntax tree as well.
- 100% compatible with existing C extensions. They have a layer called “sub-10” to do this.
Ruby on Rails Best Practices Notes:
(Marcel Molina Jr, Michael Koziarski) www.therailsway.com
- Controller with more than 6 or 7 actions with more than 6 or 7 lines each, you’re doing something wrong.
- Huge actions in Controllers not so good. Common Rails app problem.
- Think of controllers as moderators to the people speaking (in this case the Models). Do whatever you can in the Model.
- Strive for the very “Skinny Controller” and very “Fat Models”
- Try to create custom finders in the model instead of inline Model Finds in the controllers. Make them reusable.
- Every line of code in a method should be AT THE SAME LEVEL OF ABSTRATION – Keep low level details out of controller methods, keep it at a high level of abstraction.
- Use “Model.association.find/create etc” instead of individual Finds for different models that are related and have associations. AR Magic, use it.
- Custom, re-usable finds are your friend.
- In models, you’ll want to “extract” functions into higher level, clearly named methods. Easier to understand than parsing the actual login. Call method instead of writing the specific logic. It is also re-usable. Gives clarity of thought and is more simplified. You keep a smaller buffer of things to remember after parsing specific pieces of logic.
- :with_scope is usually not needed, 9 times out of 10. They will make it harder to use in Rails 2.0
- Though :with_scope looks cool and easy to use at first, it makes things very hard to understand what is going on when things get bigger. Makes it hard for new developers to pick up off the code, you’re being “Too Clever.”
Building Rich Internet Applications with Flex and Ruby on Rails Notes:
- Build advanced UI’s using flex.
- RIA’s = Rich Internet Applications
- 2 methods: DTHML & Ajax and Plugin based (Flash, Silverlight etc)
- Flex based off Flash Player 9 and Actionscript 3. New VM in Flash 9
- Flex is a programming language. Based off NXML and Actionscript. Uses Swif.
- Flex 3 coming out.
- AVM2 (new VM in Flash 9) built for new rich apps. Aimed at performance and speed. Supports full runtime error reporting, built-in debugging, binary socket support. Also backwards compatible with AVM1 for backwards compatibility.
- Old apps based on AVM1 (Written in Actionscript 2) running in AVM2 (Written in Actionscript 3) also get speed benefits.
- AVN2 is open-sourced to Mozilla. Will be built into Firefox 4 (JS2, modified version of Actionscript). Tamarin Project.
- AS3 fully OO programming scripting language.
- Flex SDK cross-platform dev framework. Flex 3 SDK will be opened-sourced.
- YouTube uses Flex. Mixbook is a Flex app (uses Rails as a backend).
- Buzzword an online word processor built in Flex. Very dynamic and fluid UI.
- Yahoo local mapping engine is done in Flex 2
- Connecting Rails to Flex, 3 components in the SDK
- HTTPService
- Little requirements
- Widest variety of connection options
- Offers little in options of data return, doesn’t offer much control.
- Allows you to connect to RESTful interfaces.
- Use XML as an interface. Respond_to – Feed that from Rails to Flex.
- FlexBuilder for Eclipse is a great plugin as a Flex IDE.
- Binding in Flex is handled in the framework.
- Basically use REST calls from Flex and put/manipulate the info WITHIN the Flex UI.
- Converts XML into Actionscript Objects within Flex
- RPC Object
- Use SOAP based XML wrappers.
- Publish in WSDL
- RemoteObject Component (Best option)
- Client side component
- Standard requests over http and https
- Packaged like SOAP but descriptors are binary
- Smaller Data Payload
- Faster Net Transfer
- Typed Object
- Requires Flash Remoting Gateway on Server
- Server Side Endpoint for Communications
- Implemented in many languages
- Uses SSI – Java, CF, Ruby, Rails, PHP and .NET
- WebORB for Rails is a good Rails plugin for using RemoteObject to integrate Flex and Rails. By “Midnight Coders”. Written by Java guys, made like a java app.
- WebORB uses AMF for data transfer.
- WebORB lets you communicate between Rails/Flex like one app.
- RubyAMF is also good. Open Source, 1 developer. Rubyamf.org
- RubyAMF, same features as WebORB but 20-30% FASTER
- Can be used with or without Rails
- MIT License
- Uses respond_to in controllers to specify correct response format.
- Installed as a plugin.
- Flex.org – For Ruby Developers. Lots of tutorials / Docs.
- simeon@simb.net – Simeon Bateman
- blog.simb.net
- simb.net/blog (older none-migrated content.
Creating Hybrid Web + Desktop Apps with Rails and SlingShot:
- Allows full sync with desktop version
- Removes latency of Internet, duh.
- Distributes processing to the edge of the network (users computer, ala Flash)
- Advanced Sync with peer to peer serviing. Even create “micro-lands” on an application level.
- No address bar, no backbutton.
- Open Source.
- SlingShot:
- Mac + PC Desktop app
- Rails Plugin
- Ruby + Mongrel Runtime
- Set of conventions
- GPLv2 open sourced
- Sync DB + Filesystem
- Use same code online + offline.
- Drag + Drop functionality.
- Competitors:
- Silverlight
- Adobe Flex
- Google Gears
- Firefox 3
- Custom desktop app + REST API
- Architecture:
- Client side Rails Server. Communicates with your servers via XML/HTTP
- You package your app in the SlingShot container. Need to be ok with showing your code.
- Radient CMS has a slingshot version. (interesting)
- Syncs at the DB level. Uses SQLite3 locally
- Provides hooks to write your own sync code
- You need to use Rails Ruby Wrappers for SQL.
- Need to have created_at and updated_at are added to the models you want to sync.
- D/L Dragging out of the browser only works in OS X at the moment
- SlingShot Doesn’t:
- Sync conflict resolution –
- Encrypt data
- Domain-specific on/offline issues
- Package your app automatically
- Update yourself + Rails app code


