Fun with Pointers (or maybe Fun with Engineering Students) – September 20, 2016
I was a teaching assistant for 18-349, Introduction to Embedded Engineering for three semesters in college and I really enjoyed it. One semester, the professor asked each of the TAs to create a test problem, and I had quite a lot of fun with that, though my students didn't. Only two students out of 100+ got it entirely correct, though maybe 30% got most of the problem correct. Students always have trouble with pointers, and understanding how their are addressed, de-referenced, etc.
Here is the problem (note that you are at a disadvantage compared to the students because they should have known what size integers and integer pointers are):
Playing with pointers with ARM 7
Given:
int str[10] = {0,1,2,3,4,5,6,7,8,9};
int i, j, tmp;
int *K, *L;
For the code examples of A, B, C, and D below, mark which samples correctly reverse the order of "str". If not correct, explain why for each such sample. Assume 32-bit words.
A. for (i=0, j=9; i<5; i++, j--){
tmp = str[i];
str[i] = str[j];
str[j] = tmp;
}
B. for (i=str,L=i+36; i<L; i=(int*)i+1; L--){
tmp = *(int*)i;
*(int*)i = *L;
*L = tmp;
}
C. for (K=&str[1]; L = &str[10]; L-K+1 != str[9]; K++, L--){
tmp = *(K-1);
*(K-1) = *(L-1);
*(L-1) = tmp;
}
D. for (K=&str[0], L=K+9; K<L; K++,L--){
tmp = *K;
*K = **(&L);
*L = tmp;
}
The reason for the test problem is that I saw students writing things like *&var and if it didn't compile, add another * or & until it did, but without any understanding of what those symbols actually meant. Though almost everyone got it wrong, some students did take the time afterwards to go through the code and actually understand what was happening. It is my belief that if you can understand these code samples, you understand pointers completely.
Some students objected to the answer on moral or philosophical grounds, and I think the professor didn't end up weighting this question all that much when he scaled the grades.
One student went to office hours with the professor and managed to convince the professor that I was wrong, but I met with the student and we typed it into a compiler and ran it so he could see how it worked.
Note that I'm not saying this is the right way to write code. Also, note that despite this test problem, students always rated me really high on the evaluations...
Notice: Physical Server Move – February 20, 2016
All of the servers need to be moved this weekend (the move has been in the works for the last three or four years...) and so there will be some downtime for each of the servers, around 15 minutes starting at 5:30AM, and finishing up by 7:30AM on Sunday morning.
Hopefully, this time frame will be as least intrusive as possible for you and your visitors/customers.
UPDATE: 2/21/2016 7:48AM: Everything went as well as it could have, and most of the servers had even less downtime than expected. We took advantage of the downtime and ran all of the pending upgrades at the same time. Let us know if you have any problems, but we've looked over log files and websites, and everything looks like it is working well.
New SSH keys for Orange – December 16, 2015
We're increasing the security on orange to get it up to (mostly) modern standards. The fingerprint for the RSA key is:
SHA256:mOIrhJUd+tgKjvMD21YvZaL3Ew37lqIubNZj0qz6Gjc
RSA:2048:4d:b4:d8:0d:0f:74:5f:68:2d:87:b7:df:fb:cb:80:6f
Sorry for the inconvenience, but is better to be inconvenienced than insecure...
Hardware failure – October 21, 2014
Lime Daley experienced an unspecified hardware failure in a hard drive this morning, and caused some sites to be down for a number of hours. The hardware is being worked on at the moment, and most customers are fully back up. Some customers are still missing data, and that data will hopefully be automatically restored over the next couple of hours.
Heartbleed SSL Bug: Resolved – April 09, 2014
Lime Daley has updated all of our SSL certificates due to the recently discovered bug in the widely used OpenSSL libraries.
The vulnerability affected our email and web services. Unfortunately, there isn't any way to detect whether an attacker has made any use of this vulnerability or not. To be safe, you should update any passwords you have.
This vulnerability does not apply to those customers on "orange", as that server was using a version of the software that was not affected by this bug.
Additionally, access via sftp and ssh were also not affected.
Any services not protected by SSL (like web pages that don't have an https:// at the front, but just http://) are also not affected, because non-ssl services are eavesdroppable by default any way.
For more information, you can read about it at heartbleed.com. You can also test any services you would like at filippo.io.
Planet Memory Review – March 17, 2014 (read more)
I have a server that is apparently considered "old", as in, the RAM in it is old enough that manufacturers aren't making much of it any more, and so the prices are starting to go up.
I had purchased the machine only half full of processors and RAM with the idea that it would be a cheap upgrade later once I needed it. I'm getting to the point of "needing" the upgrade, and so went out looking for the parts.
The processors were easy enough to come by, but the RAM was not, and the brand new price of the RAM sticks (4GB, ECC, Buffered, DDR2, 800Mhz) was up around $50-$100 a stick, but I found them on Ebay from PlanetMemory for much cheaper - $16!
Hardware Maintenance: Clementine – March 01, 2014
A hard drive failed in clementine, and the plan is to replace the drive today, provided that USPS delivered it to the right place. I'm hoping to replace it without taking the machine down, but we might need to power down the machine for a little while to avoid losing any data during the replacement.
I'll update this page as any new information happens.
10:30AM Update: The drive has been replaced, and the machine is back up and running. Let me know if you see any problems, but everything looks good on my end. The server might be a little slow today as it copies the data to the new drive.
How is Lime Daley Like a Trappist Monk? – January 20, 2014
While the headline sounds like it might be the beginning of a bad joke, the Trappist Monks from Moncks Corner, SC were mentioned in a sermon this morning, and so I thought I would look up the article referenced, as it sounded pretty good: The Business Secrets of the Trappist Monks.
The article might be long for some of you, so I'll quote the highlights (though you should at least go read the seven bullet point "secrets").
I can think of no business mission more lofty, soft and abstract than serving God, and monasteries manage to successfully infuse this lofty mission into a panoply of niche products and mundane tasks with the kind of preternatural focus that leads to almost supernatural results.
The third element of service and selflessness is a commitment to excellence: At Mepkin Abbey every single egg is packed with a “prayerful attitude.”
This next one has happened to me. I do wonder if people can feel good about themselves when they know they are gouging their customers.
One day I was making deliveries with Father Stan when I heard one of his buyers offer to sell Mepkin’s eggs at a premium price. Stan thanked him for his kindness but said that an “egg is an egg,” and the brothers couldn’t in good conscience sell their eggs for more than the prevailing price.
I love this next one, and I really like being able to bill hourly, rather than per-project, which is more standard in my business. It takes so much time to quote the project, and then I have to estimate high for unexpected things, and so hourly is cheaper for the customer, and results in less boring work for me (quoting a project has to be the worst kind of work there is, though the sewer management guy at Star Island probably wins that contest).
Trust is the most powerful form of capital there is, and nothing makes a business run more smoothly than trust.
And lastly, in case this is getting too philosophical for you:
Every time I think I’m making progress I catch myself shoving some old monk out of the way so I can get that last dish of ice cream.
Hack the Hackers – December 20, 2013 (read more)
I have a customer who installed a machine with the administrator/root password very weak, and left it open to the internet. Someone guessed the password, logged in, and then helpfully ran 'screen', so I could watch what he did (presumably - he might have been smart enough to do other things, and we will format the drive, but it was neat to see all of his commands, including typos, and guessing at some commands, because he must not have been familiar with CentOS).
He had a script that he ran to check out other machines around the world, simply doing a port scan, and then using ssh to try out accounts and passwords off of a statically generated list, so if you were bad enough to have the password "root" or "toor", etc. on your root account, then you get recorded.
His script generates a text file of hacked machines, so I emailed the administrators of those machines (living in Hungary, United Arab Emirates and Germany), and let them know that they have insecured machines on their network. But, the cool part is still to come...
Importing Data From Ning – July 26, 2013 (read more)
I have a customer who is trying to move their website from ning.com to a new web hosting provider, and ning supposedly provides a method for exporting the data, but they acknowledge that their data format is broken, and so requires manually editing to make it readable by other parsers. They bug they know about is that the ning files start and end with extraneous parentheses, and so those have to be removed prior to reading by any JSON parser. You'd think that Ning could remove those parentheses, but perhaps this is their goal - to not let people leave their service after starting with them. If that is the case, then I'm sorry to say that I'll be wrecking their business model by showing you how to get your data out of Ning...
