Arc and Angle To me programming is more than an important practical art. It is also a gigantic undertaking in the foundations of knowledge. – Grace Hopper

17May/120

Git’s use of checksum SHA-1 for data integrity

In my previous post, "Thinking of Using Git for our Version Control System", I briefly mentioned that Linus Torvald would only use a VCS that could gauruntee that everything that went into would also come out of it. This would mean that if any files got corrupted, the software would be aware of it. I wanted to know how a CVS could do that, so when my aforementioned book, Pro Git by Scott Chacon, came in from the library, I was pretty excited to find a brief description of that process in the first chapter. By the way, that link brings you to the entire book online. I personally like to have the physical book because I can read pieces of it on my bus ride or easily in bed, but it's great that it's available for free online for anyone with internet access.

So back to the process of how a VCS can have integrity:

Everything in Git is check-summed before it is stored and is then referred to by that checksum. This means it's impossible to change the contents of any file or directory without Git knowing about it. This functionality is built into Git at the lowest levels and is integral to its philosophy. You can't lose information in transit or get file corruption without Git being able to detect it.

The mechanism that Git uses for this check-summing is called a SHA-1 hash. This is a 40-character string composed of hexadecimal characters (0-9 and a-f) and calculated based on the contents of a file or directory structure in Git. A SHA-1 hash looks something like this:

24b9da6552252987aa493b52f8696cd6d3b00373

You'll see these hash values all over the place in Git because it uses them so much. In fact, Git stores everything not by file name but in the Git database addressable by the hash value of its contents.

A checksum algorithm creates the hash string and stores it in the database. Then, at a later time, the hash string is recomputed and compared with the string stored in the database. If it is identical, corruption almost certainly didn't occur and if it isn't identical, there is likely file corruption that occurred either during the file transmission or storage.

The SHA-1 hash that Git uses for check-summing was created by the NSA. Maybe it's naïve to put unquestioning faith in the abilities of the NSA, but my instincts tell me that it's a pretty good sign that this mechanism works well.

SHA-1 (pronounced "shaw" as in "Andy Shaw" one) is actually most often used for encryption, but Git uses it solely for data integrity. Linus Torvald talks about using SHA-1 to check data integrity in a Google Tech Talk.

27Apr/120

Thinking of Using Git for our Version Control System

At work, we're redesigning the main website from the ground up and are currently developing protocols for how new content will be implemented and maintained. Since we are a large science museum, there is a hefty amount of always changing content (exhibits, 3-D shows, IMAX shows, live presentations, events, etc etc). In addition to frequently changing content, we also need to make sure that what goes online meets our branding and marketing guidelines, education standards and accessibility standards. This is all a long way of saying that there are many people working on any given portion of the site at any given moment, so we're in the process of researching the best version control system (VCS) to meet our needs.

I've pretty much come to the conclusion that Git is the way to go. In a  Google tech talk, Linus Torvald, known for initiating the development on the Linux kernel, rips on CVS (Concurrent Versions System), harshly and only half-jokingly claiming that for 10 years of Linux kernel development, they used tarballs and patches and that was STILL better than CVS.

In 2002, Linux kernel development started using BitKeeper because, for a variety of reasons, Linus Torvald thought it was the best VCS tool available. Unfortunately, it was proprietary software owned by BitMover, which led to some passionate arguments since the Linux kernel development was a free project. Ultimately, Torvald and BitMover CEO Larry McVoy agreed that life would be easier for both parties if they parted ways.

So after the Linux & BitKeeper breakup, Torvald didn't want to do any more development until he had a workable replacement. He searched for alternatives, and said the vast majority he'd write off without even trying them out because there are just some criteria that weren't up for debate.

  • It had to be distributed (Being distributed means you don't have one centralized location. Everyone works on their own branch and if it's good, instead of committing it to the "centralized branch", you just have your own good code that other people can clone and use. This eliminates the need for a few select gatekeepers and removes a lot of endless politicking.)
  • It has to perform well and be reliable (Cited Monotone as an example, which he said had great ideas  but the performance was terrible.)
  • It needs to guarantee that whatever gets put into it comes out EXACTLY the same (i.e. In many CVS's, you may have memory or disk corruption and never know unless you see it in the file)

I think we're still researching our options, but I'd be surprised if we don't use Git. Now I'm seeing if I can get the book Pro Git by Scott Chacon ordered from our friendly local library.

 

5Feb/120

The Original Web Browser Created By Tim Berners-Lee

I'm currently reading a book Weaving the Web by Tim Berners-Lee, the inventor of the World Wide Web. The book explains how the web came to be, and I've been periodically looking up people, languages and other elements that the book mentions.

Berners-Lee had quite a journey trying to get other people to understand, let alone get excited about, the possibilities of the World Wide Web as a means of freely sharing and distributing information.

One of the key features he knew he needed was a user-friendly interface. In other words, he needed a web browser.

It just so happened that a company in France had a great text editor, but they didn't want to work with him on developing it for his project unless the European Union would pay for the development time. There were lots of similar road blocks, and ultimately, he realized he had to develop his own browser so that he could use it to demonstrate the World Wide Web in a clear, easy-to-understand manner to his physicist co-workers at CERN.

He was envisioning that a browser would allow users to be able to edit documents, so his browser is like a combination of a text editor and a modern browser.

Screenshot of First World Wide Web Browser

Here's a screenshot of the original World Wide Web browser on a NeXT computer:

Librarians Really Are Gatekeepers To Information

Also, I'd like to point out that one of the key moments in getting his project to be accepted was when a kick ass librarian at the Stanford Linear Accelerator in Palo Alto (SLAC) named Louise Addis persuaded her colleague who developed tools for her, to write the program that would allow their server to be the first Web server outside of CERN. She realized that it would be an amazing way to make their huge database of documents available to physicists around the world and it was exactly what Berners-Lee needed to prove to his physicist co-workers that this Web thing would be useful to them.

8Jan/120

How To Get The Sidebar on Pages in WordPress TwentyEleven Theme

I've used WordPress software as a CMS for a bunch of websites, and I'd typically just customize the default theme, which for most of my sites was the TwentyTen theme. When the default theme became TwentyEleven, it threw me for a slight curve when the sidebar was not automatically present on pages. That seemed like an odd change.

At my last job, we simply hard-coded the sidebar and then recopied that code every time we started a new project. Well, I just realized that all of that is totally unnecessary and I really should've looked into the issue further. All you have to do is go to Pages, select all, click edit, and change the template to "sidebar template" as a bulk action. It couldn't be easier. Lesson learned.

11Dec/110

Grid Based Design

At work, I'm starting on a massive website redesign project that is already well on its way. While I have a lot of experience working with HTML and CSS to develop the structure and visual styles of a website, this project is using software and techniques that are pretty much entirely new to me.

One of these techniques is a way of approaching layout design using a grid based design structure. The idea behind it is that it provides a very well-balanced visual structure and its supposed to give developers a more thought-out and consistent layout. It's supposed to be better for quick prototyping, but for me at least, it is far from intuitive. Right now, it slows me down because I haven't gotten used to it. I'm excited to be working on this though because I do believe it'll be a very useful skill to develop and one that I would probably never have bothered to take the time to learn on my own account. With so much to learn in this field, I rarely go back to the things I think I already know and try to find a new way of doing them.

I've only taken a cursory look at our current design, but I've been reading a bit about grid designs this weekend and I'm excited to get back to work to find out a thing or two about the current design I'll be working on.  I think I'd like to pick the brain of our designer a bit and see if he'll walk me through his design process and choices. There are tons of online articles and resources on grid based design and I'm too new to it to write about it intelligently, but if anyone is interested in getting started, Smashing Magazine put together a great overview and I've particularly been impressed with Mark Boulton's "Five Simple steps to Designing Grid Systems".

The Golden Section is a ratio which is evident throughout the universe as the number Phi. You can use this ratio to good effect in design by making sure that elements of your grid conform to this ratio. Using the Golden Section can ensure a natural sense of correct composition, even though it is based in mathematics it will ‘feel’ right.

8Dec/110

Fourth Day at MOS

So I have completed my fourth day at MOS and I'm feeling pretty good about it. I look forward to work, learning a lot and the people in my department all seem really great. I know it's early, but it does seem like an ideal environment.

Today I participated in two meetings, one with the visual audio folks where we discussed some ideas for integrating video on the website. This department has a lot of archival and current videos on hand, so we're going to have more talks about potentially integrating it into the new main website in the not-too-distant future, but we have to think about how to do it intelligently and consider how it will be managed and how to best present it on the site.  We also had a department meeting where everyone summarized where we are with projects which is a nice way of keeping a large group of people integrated and on the same page. There are some really cool projects going on with work for exhibits and other systems, interesting stuff.

I've just gotten my first exposure to grid-based CSS, which I had read about a long time ago and Bonnie's brother had mentioned it to me as well, but I never really took it seriously as something to learn because I was more focused on learning classic CSS. It's a challenge because it's a very different way of thinking than I've been exposed to, but it actually makes a lot of sense and I think in the long run it'll be a much more efficient way of writing stylesheets.

This is really only another post to kind of briefly summarize what I actually want to write about in more depth if I have time. So additional potential topics:

  • command line vs. GUI interfaces
  • permanent marker on paint
  • source code control systems
  • HTML5 in an IE8 world

 

 

6Dec/110

Second Day at MOS

Oh man, so today is the completion of my second day at the Museum of Science in Boston and my head is spinning. I've decided that I want to try my best to document what is going on in my life right now as best I can, but I have so little time and so much newness. I don't even know where to start. Hopefully this weekend I'll find some time to flush out some content that adequately summarized all I've experienced and learned this week. It's 9:30 and half an hour past my bedtime, which is to say that I have to get up by 5 and get home by 7 if I'm lucky and have NO time outside of work to be spending on blogging.

So, I'll make a very quick list of things that I want to elaborate on, and perhaps if I'm motivated I'll get back to it:

  • Drupal stuff
  • Standards and HTML5
  • Museum organization stuff
  • SASS
  • Monitor ports
  • Our friendly mouse

Yawn, stretch, good night and sweet dreams.

3Dec/110

The Pragmatic Programmer

A while ago I was browsing online resources for information about programming and I had come across a reading list that recommended "The Pragmatic Programmer" by Andrew Hunt and David Thomas. I couldn't find it in the Ocean State Library System, but our awesome local librarians were able to track down a copy for me from the Salem State College Library in Massachusetts.  Whoever says that library's are obsolete simply doesn't read enough. I'm so happy I have this book in my hands now and for free; thank you Tiverton Library.

It was written in 2000, which in technology-years is ancient, but it deals with general principles and universal problems, so for the most part, it really isn't very dated.

One section I love talks about investing in your "knowledge portfolio". They're speaking my language. The basic idea is that the value of knowledge declines unless you continue to invest in it. Technology advances, market forces shift, environments are always changing and the value of your knowledge can quickly become obsolete or devalued. "An investment in knowledge always pays the best interest. -Benjamin Franklin".

Managing your "knowledge portfolio" isn't so different than managing your financial portfolio.

  • Invest Regularly (Learn constantly)
  • Diversify (The more technologies you are comfortable with, the better you will be able to adjust to change)
  • Manage Risk (Don't put all of your technical eggs in one basket)
  • Buy Low, Sell High (It can pay off to learn an emerging technology before it becomes popular)
  • Review and Rebalance

I guess I already knew all of that, but I never really thought of it as good, sound advice from a career advancement perspective. I just saw learning and trying new technologies as essential to staying passionate about what I do and I simply trusted that persistence and experience will pay off in the end. I like how they dissected those ideas and provided clarity that I can use to make better choices about my goals and how I spend my time.

2Dec/110

New Job in Boston

I have some great news. On Monday, I'm about to begin what I believe is a very exciting chapter in my work life. I'll start my first day working as a web & interactive developer at the Museum of Science in Boston. As a friend of mine so eloquently put it, that is "Alpha-Geek status...some seriously sexy stuff". The requisite Facebook announcement garnered nearly as many likes & comments as my birthday, and while I'm sure that many of those are from friends and family who are simply happy for me, I'm sure that the overwhelming response is because it's for the Museum of Science.

There is a lot to be excited about, but what really has me glowing is that it's an opportunity to do something I'm personally connected to and to advance my techie skills. Chock it up to hitting my 30's, but somewhere along my adventures through early adulthood, I've developed a yearning to do something with my life that contributes to making things a little bit better. To work for a museum that focuses on science and education and provides hundreds of visitors a few hours of fun, that's rewarding. That's something I want to be a part of.

It also just sounds like a great opportunity to advance my web skills and work with technologies I haven't had a chance to try out yet. It should be fun and challenging...perfect.

Now of course I'm a bit nervous and I'm sure it will have some stresses that I don't foresee...but that's called life. So far, everyone I've met has been incredibly friendly and helpful.

Getting this new position has reignited the spark I felt when I had just completed school and started my new position at my most recent job; I just wanted to learn learn learn and try something new. Now it feels like it's happening all over again, and to top it off, it comes with a free Segway tour of Boston.

9Sep/110

Find A Website’s IP Address

I started this blog when my whole focus was about learning and sharing, and since I've had a job, I've neglected the poor thing. Noo! I'll try to be better. I tend to make too big of a deal out of blog ideas and then put them off, instead of just regularly and spontaneously sitting down and just sharing random thoughts/tidbits. I tend to wait until I have a great big lesson, as though I'm planning a web design course or something. I think I'm going to attempt to simply share a thing or two a week. They don't need to be major.

So, for today's small little tidbit, I'm going to share something that I knew, but forgot about and was reminded only a few minutes ago while watching a Youtube clip. Sometimes, one needs to find the IP address of a website. Maybe you're really interested in the numbers that represent your own website, but most likely, you need it for some sort of functional purpose.

A recent example of this has happened at my job when we had built a new website for a client on our own server. We had simply pointed their domain name from their previous hosting account to their new hosting account with us. It turned out that some of the company's employees had saved some bookmarks to certain pages of their previous website on their desktops, and when we pointed the domain name to new servers, they couldn't access their page anymore...even though they hadn't yet canceled their old hosting account. The files were still on it, but the domain name wasn't pointing to that server anymore.

So we told them that as long as they still had access to their hosting account, we could probably get the specific directory moved to the new server. We had the proper FTP username and password, but the domain name wasn't going to work. We needed their IP address in order to connect to that server. They didn't know what their IP address was.

When I need a client's IP address and they don't know it off the top of their head, which is rather normal and probably healthy, I was sending them to http://whatismyipaddress.com/, which is fine, but it's much faster and much more responsible to simply get the IP myself...and I forgot that I could use command prompt to do just that.

So, to all dorks, web designers and others, this is a really really simple way of getting a websites IP address:

How To Ping A Website for it's IP Address

Step 1: Open your command prompt. On my current computer using Windows XP, you just go to the Start menu, then click run. Type "cmd" (without the quotes) to open command prompt and click OK.

Step 2: Once your command prompt is open, type: ping websitename.com (don't actually type websitename.com. Type in the name of the website that you want to retrieve the IP address from.) So for example, you could type: ping arcandangle.com and it was display a few bits of information including the IP address.

That's it. I should mention that in the example I started with, I wouldn't be able to ping that client by their domain name and get their old IP address. It would have given me the current IP address that their domain name was pointing to, which would have been our own server. BUT, the lesson here is that before transferring a domain name, I could have pinged and recorded their IP address just in case I needed it in the future.