-
Author Archive
Knowledge Nuggets
Friday, January 20th, 2012 by Christian MattixAnyone who has done development, design, or IT knows that over the course of working on a project, you collect various “nuggets” of knowledge that you ever learn or find. Here I’m going to share some of what I’ve discovered that may be able to help you in your own projects. I have cited the original source of the information if I have that available. If there is something that I’ve left out, feel free to add it in the comments.
“Fatal error: Out of memory…” occurring when PHP and Apache memory limits seem fine
This problem drove me crazy for a little while. I did everything that I thought I needed to do, I changed the php.ini file to increase the php memory available until I ran across this link which provided the answer. We are using WiredTree as our hosting provider, for their servers, the problem was fixed by simply adding:
RLimitMem 128000000to the .htaccess file in the www root directory. After doing this, it fixed everything.I keep getting Notice: Undefined offset: 1 in views_block_view() in Drupal 7
After doing a bunch of operations during prototyping a Drupal 7 site we kept this error. There wasn’t anything that we seemed to be able to do to eliminate it from the Drupal administrative interface. After searching the web for quite some time I came across this page: http://objitsu.com/node/29 which gave me all of the information I need. From the article:
It’s caused by stale records in the block table that then fail to resolve. There’s plenty of reading material out there and suggested fixes etc. that I am sure work but once I knew what the problem was I applied *my process* for all Drupal problems like this.
- Find the code that issues the message..
- Trap the code and drupal_set_message() the offending item
- Use that information to fix-up the database / code as required.
Here’s how the fix works for this particular problem. In my case I edited views.module, line 569, here’s the code that was causing the notice to be show:
list($name, $display_id) = explode('-', $delta);
and here is what I added to the code to find out what the duff delta in question was…
if (count(explode('-',$delta)) == 1) { drupal_set_message($delta); } list($name, $display_id) = explode('-', $delta);
All I did then was refresh the page, take a note of hash value that was displayed and then cutting-and-pasting it into a command line MySQL session I issued this query:
mysql> DELETE FROM block WHERE delta = 'd98a0bfa5a33e7d8bab0fc0670bdc9fd'; Query OK, 4 ROWS affected (0.01 sec)
Which took out all four problem pages at once.
What are the command line commands for git?
We use git for source control of our iOS projects. I found a great cheat sheet of git commands here:
Git Cheat Sheet.Netflix takes over the Internet
Wednesday, May 18th, 2011 by Christian MattixAccording to a report by Sandvine, Netflix is now the largest source of internet traffic in North America during peak hours. Netflix streaming video service now accounts fro about 29% of peak traffic, overtaking P2P, Bittorrent, and Social Networking.
These numbers show a distinct shift in media consumer behavior. More and more of people’s entertainment is coming from OnDemand sources. Below is an interview with Netflix CEO given by TechCrunch talking about the future of his company. He says “Streaming is at the core of our business,” and it seems that he is very much correct.
Source: TechCrunch.comWhile this is great for consumers, where does it leave advertisers? The rise of on-demand media has made the time honored tradition of a “time slot” in advertising more and more obsolete.
What do you think? Is the internet going to fully replace our TVs? Is the generation that grew up with “on-demand” entertainment at their fingertips going to continue to consume media like the cable and networks provide? Where exactly do advertisers fit? We at Force 5 would love to speak with you about video opportunities, cutting edge marketing, or internet strategies to bring your brand to new customers. Just give us a call or fill out our Force 5 contact form and we will be happy to speak with you.
Now pass the popcorn. . . . lets see what is on the Internet.
Plymouth Indiana Riverside Intermediate School 6th Graders rank #1 in the nation on FBI contest
Friday, May 13th, 2011 by Christian MattixIn a world where we often hear about “these kids these days” it is great to hear about those doing very well. This spring the 6th graders from Riverside Intermediate School in Plymouth, IN for scoring highest in the nation for April 2011 on the FBI-SOS Internet Safety Challenge. From the FBI-SOS Internet Safety Challenge website:
The mission of the FBI-SOS Internet Challenge is to promote cyber citizenship among students by engaging them in a fun, age-appropriate, competitive online program where they learn how to safely and responsibly use the internet.
Source: www.fbi-sos.orgAmy Gerard, the Computer Applications teacher at the school should be very proud of her accomplishments with her students.
“They had the highest score in the nation for the month of April,” said Gerard. “The FBI office in Indianapolis will be sending a representative later in the month to talk to the students about internet safety, about what it’s like to work at the FBI and present us with a trophy.”
“That technology offers all sorts of exciting opportunities but our kids need to be aware that it also has possible dangers. You see news stories all the time about bad things that can happen to kids who aren’t careful. It’s very important they be aware of possible dangers and make good decisions.”
Source: Plymouth Schools’ Alumni AssociationWith the commitment to security that we have at Force 5 it is great to see area schools instilling the same values into their students. What to all you readers think? Should computer security and and online safety be added to the core curriculum of our schools?
Google Chrome OS CR-48 First Impressions
Friday, January 28th, 2011 by Christian MattixThe day before yesterday I got home from work and was greeted by a plain brown box, correctly addressed to me, on my front porch. I thought this was rather curious, as I had not ordered anything. I brought the box in from the cold (it was about 12 degrees outside). My kids were with me and they were just as curious as I was, asking “What did you order?” “Nothing that I’m aware of,” I answered, but it was certainly addressed to me. The return address didn’t have a company or name on it, just an address. Well, since it did have my name on it, I opened it, to be greeted by another box, this one less plain.
Now I was incredibly curious. As you can see, the box has no brand, label, or even words. At this point, my curiosity was completely piqued. After taking that box out, I notice the back of it has the “Lithium-Ion” battery warning on it. And judging from the shape and the weight I though, “ok, is this a laptop?”
It is indeed. It seems that I was one of the people chosen to take part in the Google ChromeOS Pilot program. I opened the “mouse box” to find a “shiny” new Google CR-48 Chrome OS Notebook. Now this was an incredibly surprise to me. I watched the announcement of the pilot program back in December as it was happening. As soon as they announced that the website was up to sign up, I did, and then didn’t think about it again. I figured I was among the 32897298346734678346 other people to sign up for the same program. Well much to my surprise, I was chosen to take part. (Maybe it was because my previous blog post about using Chrome, but I doubt it). I un-boxed the notebook, and followed the (very brief) instructions on how to get started, and within 5 minutes, I was online, connected to my wireless network and able to have access to the web.
I have now been using the notebook for a couple of days. I would like to have been able to use it more fully for my work as well as entertainment. Unfortunately, not all of my work translates well to a device like this. There are a few things to keep in mind with this computer.
First, EVERYTHING is based in the Cloud. In order for this device to function it needs to have a network connection. On first thought, this seems like a significant limitation, but with the fact that Wi-Fi is becoming more and more ubiquitous (you can get wireless access anyplace from your Starbucks, to McDonalds, to even my kids’ school now), it is much less of a problem than you would think. And for those times that you are not within range of an access point, and you NEED to get online, Google has thrown in 100MB/Month of Verizon Wireless 3G access for the first two years. That isn’t a ton of data, but if you need to get your email, or find directions, it is enough for a casual user. If you need more than that, then there are other options to purchase more data.
Second, EVERYTHING is based in the Cloud. This means no local storage. No flash drives. No CD drives. No software installs. Everything comes from the web. Software is installed via the Chrome Web Store. From there you can install a variety of apps, from things that you would expect like Google Docs, to utilities like Quick Note, to HTML5 based games. There are even some development tools, such as PHPanywhere (a completely cloud based PHP development environment that has support for in browser FTP). The user experience of installing the apps is great. There is very little to do other than just click “install” within the store. There are not a ton of apps built for ChromeOS yet, but I can imagine the quantity rapidly increasing as the pilot program continues. There is one thing that I don’t like about this environment: printing. In order to print from the device you have to use the Google Cloud-Print service. While the idea sounds good (the ability to print from any device, any place, to your printer) it just doesn’t seem very elegant. I don’t necessarily like the idea of having to send my print jobs to the internet in order to print to a printer that is 2 feet away from me, and connected to the same network as my notebook. This may be more of an “in my head” complaint, however, as I have net had to need to print anything.
The notebook hardware has a very solid feel to it. It doesn’t feel “chincy” or “Plasticy” like some inexpensive devices feel. The keyboard has very good “action”. You will notice that there are some changes to the “normal” keyboard though. Along the top, where the function (“F”) keys normally are, there are operation keys.
Also, instead of the Caps-Lock key, there is the the “Search” key. This opens up a new tab and puts focus on the “Magic Bar” (the address bar that also acts as a search box).
There is 1 VGA port, for connecting external monitors/projectors, 1 USB port (primarily for external mice), 1 headphone jack, 1 SD Memory card slot (for uploading files to the Cloud), and the power adapter connector. Also embedded in the display bezel is a webcam and microphone.
I have yet to fully test the battery life, but others have reported that the battery life is about 8 hours.
I plan on continuing to give my impressions of both the device and the software on it as I use it for my own and Force 5 work. Check back later for more!
Switching to Chrome or: How I Learned to Stop Worrying and Love Ads
Friday, January 21st, 2011 by Christian MattixA few weeks ago I was reading the usual list of technology sites and came across an interesting debate on how Microsoft is planning to embed ad blocking technology into its browser, while Google and Mozilla will not. The items that were discussed got be thinking about what I use and how that relates to the Web as a whole.
I have been using ad-blocking software since it because available. According my my perception it sped up my browsing experience, and improved my security. (Not to mention I didn’t have to see a million ads asking me to punch a monkey or lower my mortgage interest rate). To me this was great! It was like being on a freeway or limited access highway: I didn’t have to worry about interruptions, or other people getting in the way of my car causing an accident. However, I didn’t think about one thing: LOTS of the websites that I rely on as a developer for technical resources, tools or documentation rely on ad revenue for operations. This is especially true for open source software.
Now I use many tools and reference sites while I am working and I started thinking: what if they went away? Would I be willing to “subscribe” to the site? What is the value of the information? Those questions, as well as the release of the new-er versions of Chrome led me to the decision to switch to Chrome as my primary instrument for browsing the web.
This took a few days to get used to, as one can imagine. Some of the sites that I go to regularly suddenly got a lot more “noisy”. I had to deal with a few pop-under ads (which I hate). I have had to learn to deal with the “creepy” factor of getting custom ads delivered to me across multiple sites based on my browsing history or email contents. Overall, however, my “web” experience has not been significantly hindered.
Now I do still use AdBlocking software when I am doing research into some of the more “grey” areas of the internet (security research, etc), but overall for 90% of my web usage now, I am free and open to be marketed to. In many ways it has been beneficial, as I am getting informed of products or services that I may actually be interested in.
All in all, I’m now a Chrome user. Of course, we at Force 5, design our solutions to be used by all technologies, but for me personally I’m enjoying the speed and other features that Chrome gives me.
How-To: Use Wget to Automate the Karamasoft UltimateSearch Indexing Process for Your Website
Wednesday, January 5th, 2011 by Christian MattixAlmost every modern website has a “search my site” module of some sort added to it. In this How-To I’m going to explain how to set up Karamasoft UltimateSearch to automatically rebuild its index on a repeating scheduled basis in a Microsoft Windows hosted environment.
First, you will need to obtain the UltimateSearch software from the Karamasoft site, found at: http://www.karamasoft.com/UltimateSearch/Features.aspx. Follow the directions provided to get the tool installed into your particular hosting environment. For this How-To I’m going to assume that you have a website www.example.com that you have the tool installed in. The process for starting the indexing process is as simple as accessing a particular webpage on your site and passing it a particular operation code in the query string. To start the full indexing process for our example site you would navigate to:
http://www.example.com/UltimateSearchInclude/Admin/UltimateSearch.admin.aspx?cmd=IndexFull
We want to be able to call this process via a script, so we will need something lightweight and easily used from within a scripting language. A perfect tool for this is the Open Source GNU Wget utility. From the GNU Wget site:
GNU Wget is a free software package for retrieving files using HTTP, HTTPS and FTP, the most widely-used Internet protocols. It is a non-interactive commandline tool, so it may easily be called from scripts, cron jobs, terminals without X-Windows support, etc.
Download and install the GNU Wget utility. The Windows port can be downloaded from http://gnuwin32.sourceforge.net/packages/wget.htm. Download the setup program, follow the setup wizard, and install the utility to your server. After the installation process has completed, add the directory that you installed wget.exe into to the PATH environment variable.
Once you have UltimateSearch and Wget installed on your server you are now ready to set up the indexing job. In order to have the site be indexed based on a schedule, the admin link needs to be visited on a scheduled basis. In order to do this, we are going to use the Wget utility that we just downloaded in a batch file. That batch file will then be called as a scheduled task by Windows.
The batch file that I created is named
USearchIndexTask.bat. In it is the following:@echo off wget -O - http://www.example.com/UltimateSearchInclude/Admin/UltimageSearch.admin.aspx?cmd=IndexIncremental > nul 2> nul
I have saved this file in
c:\Program Files\Force5\USearchIndexTask.bat. You can save it where-ever it makes the most sense in your hosting environment.Once the batch file is saved, then you need to create a scheduled task to run the batch file. In our environment I used Windows Task Scheduler to create the task. Use that tool to create a task to run the
USearchIndexTask.batfile. Choose a frequency that makes sense for your environment, based on the quantity of changes for the site. If there are very few changes made on a daily bases, then having it run once a day at midnight is an appropriate setting.Manually run the scheduled task to verify that it completed successfully, and then go get lunch. You are done!
To see more bright ideas from the Left and Right brains of Force5, check out the rest of our blog as well as our work!
How fast is Internet Explorer 9 compared to Firefox, Chrome, and Opera
Monday, September 20th, 2010 by Christian MattixThere has been a lot of activity in the browser market over the past few months. The most recent step forward is Microsoft’s release of Internet Explorer (IE) 9. Microsoft is touting improvements with IEs handling of web standards, graphics, and JavaScript. JavaScript has become the de-facto standard for web designers of dynamic and highly interactive websites. Since so many websites use JavaScript, it is very important for browsers to be able to process it very quickly. In this entry I’m going to compare the JavaScript performance of Microsoft IE8, Microsoft IE9, Mozilla Firefox (v3.6), Google Chrome, and Opera using the SunSpider JavaScript Benchmark available at: http://www2.webkit.org/perf/sunspider-0.9/sunspider.html.
In order to provide the most equal environment for the tests, I ran the benchmarks on the same machine (Windows 7 Ultimate running within a VMWare virtual machine), with no other applications running, right after a fresh reboot. I then directly navigated to the benchmark site. For the purposes of this examination, I’ll only discuss the total results of the benchmark, however, the site gives very fine grain details of the results of the test.
Here are the results of the examination:
Browswer: Time To Execute: =================== ============================= IE 8 (v8.0.7600.16385) 4089.6ms +/- 2.4% Firefox (v3.6.10) 1186.8ms +/- 7.8% Opera (v10.62 b3500) 525.4ms +/- 21.9% Chrome (v6.0.472.62) 370.4ms +/- 4.8% IE 9 (v9.0.7930.16406) 647.6ms +/- 9.5%
From these results, we can see that Microsoft has greatly improved the performance of its JavaScript engine (they have cut the benchmark time in half). Though not as fast as Opera or Chrome, which are both highly optimized for JavaScript performance, IE9 has made significant inroads. The release of IE9 has raised the bar for the Mozilla community to continue to improve Firefox. Considering IE9 is still in a beta state, one can only imagine that the performance will only improve.
How did Microsoft improve its JavaScript Engine? According to Microsoft, they were able to make the improvements by using the following techniques:
JavaScript Background Compilation: Many script engines today start with an optimized interpreter, and compile individual sections or methods into machine code to run faster. Others always compile JavaScript into machine code before running it, often compiling each method as it is needed. Both these approaches have to trade off quality or quantity of compiled code against execution speed. Generating high-quality code for today’s applications requires time to optimize the compiled code.
IE9 includes a fast interpreter for running pages quickly on startup. For compilation, we have a background code generator that compiles script code, and we push compiled methods back into the application. Because the code generator runs in the background, it can take advantage of today’s advanced multi-core machines and generate higher-quality code, while not blocking initial execution of the application.
Type Optimizations: One of the most important aspects of enabling performance on JavaScript is to create an efficient type system. The IE9 script engine uses many of the techniques common in modern dynamic language implementations, including type representation, polymorphic inline caching (also called type evolution or hidden classes), and efficient implementation of machine types.
Fast Interpreter: For pages where immediate execution in the interpreter is important, IE9 includes a new interpreter which uses a register-based layout, efficient opcode, and use of type optimizations.
Library Optimizations: The performance of JavaScript pages and applications depends heavily on key aspects of the script runtime library: strings, arrays, objects, and regular expressions. We are investing in these areas for IE9. These libraries require careful tuning for the real Web – one example is the execution of regular expressions. Most script engines today use compilation and optimization techniques to run regular expressions faster, and IE9 includes an improved regular expression implementation. In analyzing real world Web sites, we find a set of patterns used frequently, but we also find unique cases – for example, a site that creates hundreds of regular expressions and uses very few of them – we will continue to use this data to tune our regular expression implementation and other library features for IE9.
Considering IE9′s support for modern standards such as HTML5 and CSS3, and GPU support for graphics Microsoft has made a great step forward in the “Browser wars.”
To learn how to take best advantage of the use of modern technology combined with inspired ideas to bring your business to the next level, contact us at Force 5. We’d be happy to help!













