My machine crashed again last night. It’s a Mac Pro and is connected to a battery backup that then goes to wall power. Last night, I heard the battery backup emit one beep, then shut everything down connected to it. I was running late and it was the end of the day, so I let it go to review in the morning.
Next morning, I can’t get the tower to boot. I disconnect it from the battery and try again with the same result. I disconnect it from the wall and start a support ticket. A few hours later, support comes by and the machine boots up. Their guess is that the capacitors inside the power supply need to discharge completely to avoid interference in the boot process. I’ve never heard of this before, but I do know that Apple has had capacitor problems in the past. This behavior matches what happened in the summer. Machine failed to start after shutdown. Machine was eventually disconnected from wall power. Machine boots again.
Very strange behavior, but I may be forced to disconnect the power if this keeps happening. I’ll need another machine, but I don’t expect one from work, due to other issues. I’ll figure something out.
I have a small project that I need to demo. I also want to learn PHP frameworks to get me in the right frame of mind to examine Ruby/Rails and/or Python/Django. From what I’ve found there are several PHP frameworks to choose from:
- Zend Framework 2/3
- It looks nice. it would not surprise me if it ties strongly into Zend Studio, which I don’t use. I don’t enjoy learning too many things at once, so I’ll pass.
- CodeIgniter 2.2
- Also a possibility, but it seems too allow too much. MVC encouraged, but not forced. Simple tempting allowed, but add-ons built to allow work with templating engines. This time, I do want to see a framework’s creation of MVC. Maybe next time.
- I like the idea of having a framework and stand-alone components (if needed). However, I see Twig used as the template engine. I am comfortable with Smarty and want to learn one new thing at a time. Maybe next time.
- This looks really good. It uses “Eloquent”, which is an ActiveRecord (Ruby/Rails) implementation in PHP. ActiveRecord makes CRUD so much easier.
- It uses migrations. That’s a concept I first saw in Ruby/Rails, which acts something like version control for databases. Very, very cool for testing.
- On the other hand, it uses Blade template engine. I’ll deal with a new template engine another time
- Mcrypt required as part of the list of running php extensions. My stock version of php does not have Mcrypt installed. Installing it seems like a pain, so I’ll pass this time.
I’m going to try CakePHP for this small project. It has the MVC framework that I’ve used informally in the past. It can integrate nicely (I’m told) with Smarty. All I need to do now is install it.
I discovered that Mavericks (10.9.5) comes with ruby 2.0.0p481 installed. Seeing how Ruby 2.1.4 has been released, I decided to figure out how to get to the newest version. I think a big chunk of it has to come through RVM / Jewelry box (app). I also think I need the brew package management system to make sure everything comes in the right place with all the required packages.
This page seems to have the best, most up-to-date instructions I’ve found on installing the whole Ruby/RVM business.
- I installed the command line tools. I already have Xcode 6.1 installed, but I installed the command line tools through the command line, just to match the instructions.
- gcc looks good
- I already installed HomeBrew when I installed Python 3.4. It looks OK. I get a message about a file I don’t recognize, but I’m not going to worry about it
- I updated git. Now it’s v 1.9.3, which is what it was before. “which git” does point to the correct version, /usr/local/bin/git
- installed RVM, but it looks like are problems. However, version checks look OK
- rvm -v > rvm 1.26.0
- problem with ruby: dyld: Library not loaded: /usr/local/lib/libgmp.10.dylib
- suggested: rvm reinstall 2.1.4 –disable-binary
- ruby -v > ruby 2.1.4p265
- rails -v not initially installed (odd)
- “sudo gem install rails” could be an issue with sudo permissions
- rails -v > 4.1.7
The reply to yesterday’s ORM blog post is not to my post. It’s to the original post. I’m not taking sides. I just linked to them to remind myself to read them later.
Possibly a strained metaphor (Object-Relation Mapping is the Vietnam of Computer Science). I need to read it a couple of times to make sense of it, but it might be interesting.
I stumbled across this idea in a related article.
I never remember, so I need to write this down
- Get Python 3 (from Python.org)
- Hmm … Python 3.4.0 was released a few weeks ago. I may wait another week to see if 3.4.1 is released.
- install ‘distribute’, not ‘setuptools’
- setup_tools is for Python 2, distribute is for Python 3
- Use this command:
“> curl -O http://python-distribute.org/distribute_setup.py “
- Go to the folder where it’s located and run
- “easy_install” should be included
- Create a soft link to easy_install
- For OS X, it should be in /Library/Frameworks/Python.Frameworks/Versions/3.3/bin, once it’s installed
- I created an alias in my .profile, but it does not work with ‘sudo’
- Run ‘>sudo easy_install pip’ to install pip
- It should be in /Library/Frameworks/Python.Frameworks/Version/3.3/bin
- set up another soft link to pip
- “> ln -s /Library/Frameworks/Python.Frameworks/Versions/3.3/bin/pip pip”
Neat modules to consider
- Beautiful Soup 4 (screen scraping)
- virtualenv (isolated copies of Python)
- httplib2 (replacement and enhancement for urllib.request.urlopen
- mysql connector (connects Python to MySQL)
I’m helping out some people with some website testing. I was curious and I discovered it’s running on AWS. It seems a bit much for a testing website, but OK. It also spurs so many questions:
- What’s the cost to keep it running 24-7?
- Why does it use HTTP Authentication instead of sessions authentication?
- I thought no one used HTTP Authentication because it was easy to spoof. How was that done?