Putting the “fast” back in FastInviter

As you may have heard, I’ve been developing a new tool recently. It’s called FastInviter, and is publicly available at both its website as well as in a GitHub repository. I’ve been having a lot of fun developing it, but I hit a big snag along the way that made it seem…well, more like SlowInviter, to be honest. I wanted to talk a bit about that snag and how I managed to keep FastInviter running speedily.

Finishing Last in the Relay Race

A few days ago, I was working on email integration for FastInviter. Basically, I wanted the system to email someone when they created their events. Due to my Internet plan, unfortunately, I couldn’t send email locally – the IP address showed up on some spam blacklists, meaning that if I tried to send to, for example, a Hotmail address, I got an immediate bounceback email saying that the spam filter rejected my mail. I tried adjusting my domain’s MX record to allow my server to send, but no dice there either. The last option I had was to send through another company’s SMTP servers.

One of the nice things about CodeIgniter, the PHP framework I use, is that it’s very easy to configure relaying mail through SMTP, even with encryption (I manage my email through Windows Live Domains, and the live.com SMTP servers require TLS encryption). I got everything set up in CodeIgniter, added an MX record to my domain so that the live.com servers could relay mail for me, created an event (an action set up to trigger an email alert), and…

waited for forty seconds for the page to load. Finally, it timed out, telling me that the remote server terminated the request. Turns out it was just taking far too long to talk to Live’s SMTP server, so the email I was trying to send never even made it out of my network. Relaying using CodeIgniter seemed out of the question.

Catching Up

I didn’t really know what to do at this point – I had pretty much exhausted all my avenues of delivery, at least that I could think of. I even tried having PHP handle the whole process without even getting CodeIgniter involved, but that led to more errors and timeouts. I had almost given up, but decided to try one more thing – setting up a SMTP server on my local server as I originally planned, but instead of sending out emails directly, instead using it as a relay to send my mail to the Live.com servers.

My IIS 6 SMTP server

Despite running on Windows Server 2012, I find myself still using IIS 6.0 for SMTP services. I mean, yes, it works, but does anyone else find it strange that we’re using something from ages ago for this?

The procedure for doing so is a bit interesting. I configured my SMTP server as I would normally (set it up as a relay only for local mail, point it at the right directory, so on and so forth), and then went into the “Delivery” tab. In here, I had to set up the account that I had created for FastInviter to send via the Live.com server, enable TLS encryption, set the TCP port, and then add smtp.live.com as a smart host. By doing so, I basically told my server “hey, if you get mail that you’re supposed to be sending, just relay it to Live.com with the provided credentials.”

Configuring a smart host for FastInviter

In the “Advanced Delivery” option, just add the SMTP relay in as a smart host.

Now, the path of an email should be, as I saw it, initially getting sent from FastInviter, being received by the local server, and then getting relayed through the Live.com SMTP server. All that was left was to test it.

Speeding FastInviter Up

The test worked better than I had ever dreamed. FastInviter was loading in under a second. Having email routed locally first meant that there was no delay between the email being sent and the email being received by my server in order to relay it – any delay would be handled on the back end, where the end user wouldn’t even see it.

In addition to that, all of my problems connecting to the SMTP relay at Live.com were resolved. Having the connection handled through a local SMTP server simply made everything run way more smoothly. Combining this with my already-fast page load times made me feel like I was ready for anything.

FastInviter's speed on GTMetrix - a 0.65 second load time!

0.65 seconds on GT Metrix. It doesn’t get much faster.

Crossing the Finish Line

I know there’s more I could do to speed things up with FastInviter. For starters, I’m still using CDN hosted jQuery and CSS – if I bring those down and host them locally, eliminating external connections, I should be able to make the site even faster. My major concern right now is how it’ll behave once I get a bunch of events and guests going at the same time – how will the system handle that? Will my database server be able to keep up with the load? (I’ll be doing another post soon on my network architecture and how my DB server is set up). Either way, FastInviter has so far been a very fun project, and I’m looking forward to solving those problems if they do end up materializing.

Helping Out

I’ve taken steps to solve the problems outlined above, but there’s always going to be something new to improve. FastInviter has a live GitHub repository; if you’re interested in helping out, feel free to make changes and file a pull request! It’d be really cool to see some collaboration start cropping up on this project.

My trip to jQueryTO

Over the weekend, I went to the jQueryTO conference in Toronto along with Drew and another colleague from work. I’m not a pure jQuery developer by trade – sure, I know a bit about it, and I use it to do my AJAX calls, stuff like that, but I’m not coding in it all the time – so I wasn’t sure how much benefit I’d see from it. As it turned out, jQueryTO really opened my eyes – it didn’t just have some amazing JavaScript-related stuff that I could look to implement in my own apps, but also had a lot of useful information for more general use.

Of course there was some jQuery-specific stuff; the first keynote, in fact, was a chat about the state of jQuery and how it was evolving. That in and of itself was a pretty big deal for me, since I am planning FastInviter to be as universally accessible as possible. Following that was a much more general but definitely interesting talk from Lea Verou regarding the state of color and how things will be changing with color in CSS4. Call me a nerd, but I found that really interesting; a lot of the changes seem like they’re going to be way more intuitive for design.

Speaking of design, that was one thing that really changed for me at this conference. Before coming to jQueryTO, I didn’t get very excited about designing webpages. I took a lot of shortcuts using Bootstrap to style things, because it was so easy. Unfortunately, just attending a conference doesn’t make me good at design; however, I’m certainly interested in learning more now. I might switch to something like Semantic UI, though. Since I still don’t feel comfortable designing my own responsive framework, using something that I can build more from the ground up and apply my own color schemes and templating as I go seems like a good plan.

I also learned a lot about general coding philosophy and conventions, interestingly enough. A couple of the talks that I was really taken by – Nahim Nasser‘s talk on bad practices and anti-patterns in software design really opened my eyes to some things that I should be rethinking, and Dave Methvin‘s talk on JavaScript performance gave me a lot of insight into how to troubleshoot my applications. In fact, there’s a slow-running plugin that’s bogging down an app I wrote a few months back; I’m planning to use some of the strategies from his talk to troubleshoot it.

Emergent technologies was another pretty cool thing that came up at jQueryTO. Michelle Bu gave an amazing talk on WebRTC and how JavaScript could be leveraged for server-free chat and video between peers, which was really stunning. Johnny Benson‘s talk on real-time error reporting on Tumblr really blew me away, though. Being able to get real-time data when my JavaScript breaks would be a huge boon to proactively making experiences better for my users, and I’m looking forward to trying to make it work in my current applications. Finally, Nadim Kobeissi gave an inspired talk on cryptography in the browser; while I won’t pretend to be an expert in the field, I am super excited to see where this goes in the near future. The passion that he had in his talk really blew me away.

jQueryTO 2014 closed with a really great presentation from Verold‘s CEO, Ross McKegney, on Three.js, WebGL, and the future of web design. The things he showed off in terms of where the web is headed were stunning – and his announcement and video of Verold Studio was one of the coolest things I’ve ever seen. I’m so excited to get my hands on it and start playing with all of the stuff it can do.

Of course, I couldn’t take a trip to Toronto without taking the time to have some great food from Canadian restaurants. Dinner on Saturday was at Smoke’s Poutinerie – some of the best poutine in Ontario. We left before dinner on Sunday, but still managed to snag lunch at the Works Burger Bistro, a chain that looks to be fairly concentrated in Ontario and Quebec. We were all quite impressed with the food there as well; I personally have to recommend the Dead Ringer burger. While these were the only places we were able to visit, I have quite the list of places for next time. I’m planning to visit the city again this April, so hopefully I’ll be able to try some more places then!

Despite my being a relative novice in jQuery, jQueryTO was a great experience for me. It ended up being so much more than just JavaScript related technologies – instead, I learned about constructive software development practices, upcoming technologies that I need to stay on top of, and new ideas to implement in my existing applications. I can’t wait until jQueryTO 2015!

Staying productive in the winter months

The last month has been quite eventful. A lot of news, so I’ll do my best to cover as much as I can.

For starters, I should mention the wonderful video that was made about what I do at work. If you’re curious to take a look at me on the job, feel free to check it out. Bonus silly-looking facial hair is included (it’s gone now in real life, thankfully).

During mid-February, I managed to scrape together enough money to pick up a Dell PowerEdge 1950, a server from a couple years ago that has two quad-core processors and 16 GB of RAM in it. It’s a pretty beefy box, especially for the price I picked it up at. I set up Citrix XenServer on it and I’ve had a lot of fun putting it together and having fun seeing everything I can do with a dedicated server. Currently, I’m hosting all of my websites on it, running a couple of game servers, and also building a domain, but I have some other plans with it too – I’m planning to work on some desktop virtualization using XenDesktop.

Desktop virtualization and published applications were things that I was fortunate enough to be pretty involved with when I was working at the University of Montana. For those of you who don’t know what I’m talking about, a desktop virtualization server would allow you to run programs on the server, but have them appear like they’re running on your local computer seamlessly. It works both with individual applications (for example, I could install Microsoft Office on the server and run an instance of Outlook on my local computer) and with full desktops (if I didn’t need to run anything graphically intense, I could have an entire Windows-based desktop environment published to me over the network). At UM, we used low-power computers called thin clients which basically acted as dumb terminals for these published desktops, and people would work entirely off the server. It’s a very cool system that can do a lot of stuff for any company, in my opinion.

I also took the opportunity afforded to me by having this server to move all of my websites off of GoDaddy – now everything’s being hosted from my apartment. This is a nice change because of how much more control it gives me over the way my sites run. Took me a little bit to hack together some stuff to make sure my WordPress sites had the performance they had on commercial hosting, but I think they’re really running nicely now.

Anyway, having the opportunity to do all of this stuff and play around with development on my own time has really been a cool thing. It’s been nice to have the freedom to learn about new technology, experiment and learn in the direction I want to go, and be able to do this without any limitation or oversight. It’s really been great, and I’m looking forward to continuing to further my knowledge.

I’ve been having a lot of fun at work recently, too. As I said in the video above, I recently built a time off request form that also allows for a management backend where appropriate people can approve or deny requests.  That was a lot of fun to build, and it taught me a lot about jQuery and how I can leverage AJAX to build better products.

Speaking of jQuery, I’m really excited – Mainstreethost is sending me to a jQuery conference in Toronto next weekend! I’m looking forward to learning a lot there and building better applications when I come back.  I’m also hoping to apply the knowledge I gain to some of my existing projects and make them a lot more seamless from a user experience perspective.

Of course, Toronto isn’t that far away, so I’m going to be driving up for that – only a couple hours! Unfortunately, I get to do a lot more driving in the next days; my sister’s coming up to Buffalo for her spring break, so as soon as I get back home from the conference, I get to drive out to Indiana to pick her up (a 13-hour driving day, round trip). After driving her back the next weekend (thank goodness I can take two days to do it then), I have a week of downtime before I drive up to Ottawa on the 29th to pick up my girlfriend to come stay with me for a couple of months. At the very least, I’ll get to clock some more miles on my car! (I love my car – it’s the manual-transmission model, and I love driving stick shift. It also gets great MPG!)

The other big trip that I’m excited about in the near future is actually a couple of months off. Over Memorial Day weekend, I’m headed out to the Midwest Morris Ale 2014, a gathering of Morris dancers from all over the U.S. I’m not a dancer myself – I play music for the dancers – but I really enjoy the social aspect of seeing all of the people I’ve met again and enjoying the weekend with everyone. While I think the subject of what exactly Morris is is best saved for another blog, I encourage anyone who’s curious to check out the MWMA website, look at some pictures, maybe check out a video or two about it…and, of course, feel free to ask me any questions!

I’ve been rereading all of my Alistair Maclean books recently. This tends to be a lot of the way I read books these days – I don’t really buy new ones often, so I’ll go binge on a specific author for a week or two. (Now, that said, I am planning to get the new Brandon Sanderson book pretty soon – I wouldn’t want to miss out on that!) As far as Maclean goes, though, I’m getting pretty close to running out of books of his that I own – so I checked his bibliography out and realized that I was missing a couple! I’ve since picked them up, and am looking forward to reading them as soon as I get the time. The Black Shrike looks especially interesting.

Finally, I wanted to take the time to plug a project I just started for public consumption. I’m developing it on my server, and am hoping to have a working product within the next month and a half or so. It’s always going to be free – I won’t be charging for any features, although I will have a donation button somewhere on the site. You can find the project (and track its development) at fastinviter.com, and I’ll have a GitHub repository up in the relatively near future for those of you who are interested in the code.

January update

Hello, everyone! Sorry about the radio silence – it’s been a rough last couple of weeks making sure I’m good to go and all set at my new blog’s home. That new home also happens to be my home, but more on that later. For now, if you’re reading this, it means that you’re now in my apartment. How cool is that?

I guess it’s mildly creepy when you get down to it, but hey, whatever. Nice to have you here anyway.

So, what’s new with me? A lot, really. January was a pretty crazy month. I started up some planning for a new server, which I’m trying to build during March or April. I’d like to have a machine that I could play around with to learn more about development without worrying about breaking everything else that I do on a daily basis, and this just about fits the bill. Currently, I’m limited to a virtual machine running on my desktop computer, which really doesn’t give me a lot of room to work with.

Speaking of that virtual machine, I’ve been working a lot with it recently! I’ve been working on some stuff in Windows Server 2012, and most recently ended up starting the migration of all of my sites over to a locally hosted IIS instance. So far I’ve just done this blog (like I said, you’re in my apartment!), but I’m aiming to have all of my hosting moved over by April so that I don’t have to pay for shared hosting anymore.

Along with that migration, I’m also working to move my email to another service – I definitely have to recommend Windows Live Domains to anyone looking. I’m really impressed with their service so far; they made moving the email on my main domain (andrewletson.com) extraordinarily painless.

I’ve been continuing my work with PHP, most recently starting a private project with a coworker and friend of mine; hopefully it’ll be a success, but even if it isn’t, it’s been a fun learning experience as I have been able to start delving into how to work with payment API’s. We decided to go with WePay, which really fits our needs well as well as providing us with support if we run into any trouble. I’m very excited to work on this and am hoping to have the time to really sink my teeth into it this weekend.

Sarah’s visit here has ended, but we had a great month down here together. I’m definitely looking forward to the next time I get to see her; I really enjoyed our time together as always. We managed to do some fun local stuff – headed out to Niagara Falls for the new year, although it was quite cold – but I’ve definitely started working on some more plans for next time! One of my favorite places nearby is Panama Rocks; I haven’t been there in a few years, and I don’t remember it very well, but that might be one place I try to put on the agenda.

Unfortunately, all the wonderful news has to be tempered a bit this month. My great-grandmother unfortunately passed away only a few days ago. She was a wonderful woman, and I am happy to have known her. She did so much with her 97 years of life here. While I’m sad she’s gone, I have been trying to reflect on the wonderful memories I have of her, of which there are many.

This year, I’m doing my own taxes for the first time. I’m a bit nervous, and hoping I don’t screw it up, but so far it looks like I’m going to get a pretty reasonable return from the government. I’m pretty excited about that. I’m still waiting on a 1099 form from my bank though, so it will be interesting to see how that changes the numbers.

December update

Hello! Long time, no see. Sorry I’ve been missing for so long!

I had a lovely last month and a half; I’ve been doing a lot of cool stuff at work recently, including more work on the timeclock as well as putting together a CentOS Linux webserver built on top of a Dell PowerEdge R720. This was the first experience I had with doing secure sites on Linux as well as doing multiple websites on the same Apache server – a ton of fun and a great learning experience for sure. It was especially cool because it’s also the most powerful server I’ve ever done work on – 24 CPU cores and 48 GB of RAM. Working on a blazing fast machine like that is really something else.

Process monitor on CentOS Linux

Just an idea of how awesomely beefy this server is. So amazing!

This has turned into a longer project for me, too, which is nice. It’s given me something that’s been a good challenge as well as the chance to continuously refine and improve my skills with Linux. I’m looking forward to see what I can do from here with this.

Thanksgiving was quiet for me – just spent it with my grandparents – but Christmas was a bit more eventful. A lot of family members came into town, so I got to spend my days off with both my immediate family (who drove in from Montana – and brought a lot of books from home as well as a few cans of Cold Smoke scotch ale!) as well as my grandparents, assorted cousins, an aunt, and an uncle.

Sister and cousin

My sister and cousin came to stay at my apartment . This picture, however, is from Christmastime at my grandparents’ house.

Parents on a piano bench

Lots of relatives came down for the holidays including my parents. Everyone had a great time!

Old-time music

Before they left, my parents did an impromptu folk/old-time concert for everyone.

It was interesting having people staying at my apartment – especially since I didn’t really have any couches or anything – but things worked out pretty well. It was nice to get to see everyone, and I got some wonderful new things for my apartment! I’m very excited, for example, about my new slow cooker – it’s pretty amazing to be able to just put things in the cooker in the morning and have them done when I get home.

Unwrapping a slow cooker

I was so excited when I unwrapped the slow cooker! It’s been a lot of fun using it so far.

Once Christmas was over, people started going home – so I felt okay taking a couple days to drive up to Ottawa to see my wonderful girlfriend. Once it came time for the visit to be over, we came back to my apartment – she’s going to stay with me for a month! It’s really great that we are able to spend time together. It’s also quite nice that my refrigerator is now full of actual good food instead of pasta and sauce – although we did make a wonderful pasta-based dish a couple nights ago! :D

Snuggling on the couch

It was nice to come back home after the trip, although Sarah was very nervous about meeting my grandparents.

Enjoying a dice game

Sarah and I spent a couple nights hanging out with my relatives. Lots of fun was had!

Cooking has honestly been a lot of fun recently. I got to help make a delicious risotto (secret: chop up avocados and put them in) cooked in a wok, as well as put that slow cooker to use and cook up what was supposed to be pot roast (it turned into a delicious stew). I’m looking forward to doing more with it.

I’ll try and post another update again soon. Sorry about the long delay between posts!

Taking a break – or, “How I Spent My Autumn Vacation”

Hello everyone! I made a solemn vow to not speak about PHP or coding at all for at least one blog post. :) Instead, I’m going to talk about last weekend, when I took my vacation days from work and went on a little trip. It was a lot of fun, I really enjoyed it, and now I get to tell you all about it!

I left last Friday to head to Toronto for the season 3 finals of the StarCraft II World Championship Series. When the tickets first went on sale, I noticed that the event was going to be in Toronto – and seeing as how that’s only 2 hours away, I decided that it would be a fun thing to do. I made it up a little bit earlier than I expected – I had planned for a typical bridge crossing at the border (30 minutes) and at least some Toronto traffic (maybe add an hour), and neither of those things materialized (well, I did have a little traffic in Toronto, but only on one highway, and only for about 5 miles. Not so bad. The only hiccup was when I was crossing the border – I had built a computer to take up and give to Sarah, and the customs agent at the Canadian border mentioned that typically there would be a gift tax (but he didn’t charge me – “Hey, you built a computer for your girlfriend. Good for you, I’m not gonna ding you for that.”).

Anyway, I ended up getting to the convention center about an hour earlier than I expected to – which meant I had time to get in before the event started! It wasn’t too crowded on Friday (I imagine many people had work or school on Friday), so I was able to get a great seat – 3 rows away from the player booths. While on Saturday and Sunday those seats were reserved for people who bought the “premium passes”, it was really cool to be able to sit so close to the players!

Players warming up

While I can’t tell who the other player is, the player on the left is MMA. I didn’t take too many pictures once the games started, though.

While I didn’t stay for the latest games on Friday (I found out the next day that they went until 1 in the morning), I still had a lot of fun. It was even better on Saturday when, while I didn’t get as good of a seat, I still managed to sit right in the middle of the crowd for the first few series. I later lost that spot, but only because there were players signing autographs. As it turned out, it was fortunate that I did lose that seat, since while I was over in the autograph line I ended up being right near the side of the stage where the players went back to their area from. This meant I got to see Jaedong walking off the stage after he lost out of the tournament on Saturday. While I unfortunately didn’t have a camera that could handle the low light levels (I’ll check my camera’s memory card this evening to see if I took any pictures at all), the image will stick with me – he looked, as he walked down from the stage, as if the world had fallen on him. He signed autographs later that day, though, and I had the chance to meet him – he speaks English quite well, and I told him that he was still my favorite Zerg player. He looked up, smiled, and said “Thanks a lot” – I felt like I made a pretty awful day for him a little bit better. :)

Me and Day[9]

Day[9] was the person who originally got me really interested in StarCraft and e-sports. It was really cool to finally meet him!

I also met a couple other people that day – specifically, Polt (a Terran player from Korea who’s currently going to school in Texas) and Day[9] (a caster, former player, and general ambassador of StarCraft). Day[9] is possibly one of the coolest people I’ve ever met. He took so much extra time in order to actually have conversations with the people who were waiting to meet him – we talked for a few minutes and it was just so neat that he actually took the time to do that.

Met Polt at WCS too! He's got great English and is a really cool guy. Noticed my sweatshirt too (he used to be on TSL)!

Met Polt at WCS too! He’s got great English and is a really cool guy. Noticed my sweatshirt too (he used to be on TSL)!

I did end up staying all day on Saturday, and when I woke up on Sunday (to the fire alarm going off – this happened both days in my hotel, at 9 in the morning! Ugh!), my throat was completely wrecked from all of the cheering. Still, I was ready for Day 3.

I ended up checking out of my hotel early on Sunday to make sure I could get to the convention center a bit early, as I expected it to be crowded for the finals. I ended up being right – while I got to stay inside waiting for the convention hall to open, the line outside stretched quite a ways back. There ended up being over 2500 people attending on Sunday, and the already-impressive crowd was that much more passionate and energetic. This series (game 1 linked), between Maru and MMA, was really a great example of how awesome the crowd was – and they were like this all weekend!

Remote controlled probe

Met this little guy in the convention hall too! Thought he was gonna cannon rush my chair…


Sadly, that series was the last one of the tournament that I could stick around for, as I had other places to be – specifically Ottawa, where I was looking forward to spending some time with my wonderful girlfriend Sarah. I ended up leaving Toronto around 7:00 pm – a bit earlier than I had planned, but it worked out alright as I got into Ottawa right before midnight. (Traffic out of Toronto was quite a bit heavier than going in – nowhere that it was actually stopped, but it was still moving pretty slowly for a while).

Sarah and I went out for dinner on Monday to a lovely restaurant downtown called Murray Street. I was expecting it to be good food – a lot of their stuff is sourced locally – but I was really blown away by how good the meal was. I had a lovely rabbit dish which I was really impressed with, and also got to try the poutine (which was made with duck confit and goat cheese curds!). After dinner and a nice glass of wine (a Sangiovese from Italy), we had to find room to try their dessert – which ended up being a perfect way to finish off the meal. I, personally, would definitely recommend this restaurant to anyone, and look forward to going back again!

My trip was capped off with some time spent in IKEA. I had never been in there before, and I was quite favorably impressed with the land of cheap furniture. I ended up buying an end table for $13, which was pretty awesome – I’m currently using it to hold my cell phone (my alarm clock!) glasses, and e-reader when I go to bed, and pulling it out into the living room as a footrest when I’m not sleeping. It’s quite a nice little piece of furniture.

Billy the Bookcase

Billy the Bookcase says hello. (Thanks, Jonathan Coulton – this was all I could think of!)

It was not a fun thing, leaving Ottawa. Seems like it’s always that way – I’d really rather stay! Darn responsibilities, and money, and stuff. I will say, however, that it’s a lot better now. I remember when it used to be a 60-hour bus trip to get there. Now that it’s only five hours by car, I can make the trip a lot more often.

That’s the interesting thing about the East Coast, really. It’s not just Ottawa that I’m closer to – I’m within a day’s drive of New York City, where my best friend Matt is living these days. I’m really looking forward to getting a chance to go down and hang out with him – hopefully that’ll happen soon too!

Anyway, I’ve written what must be feeling like a novel at this point. Think I’ll call it a day here. Hopefully, I’ll post another blog up soon.

Update on life, as well as more blabbering on PHP

You know, at one point I was going to use this blog as a vehicle to talk about what’s happening in my life. However, things changed as I started learning PHP, and now here I am talking about programming and design and stuff. This wasn’t how it was meant to be! (As you may have guessed, I’m going to talk code again. Before I do, though, I’m going to at least try to write some kind of update on how I’m doing.)

Work at Mainstreethost is going quite well. I had my 90-day performance review a couple weeks ago and passed it with flying colours. This is especially nice because I really do like it here a lot. The apartment is feeling more “homey” too. It’s not quite where I want it to be yet, but it’s getting close. Once I get a bit more furniture (like a couch, armchair, stuff like that) I think it’ll be set.

The last couple months have been very busy. I’ve been trying to keep on top of all the new stuff that I’ve been learning, but it’s a difficult mindset to switch to – while what I’m doing is still solutions-based work, which I love, I was originally a tech support guy, not a coder. Now, not only am I coding, but I’m coding a timeclock system…something that I thought I wouldn’t have to think about again. I’m also doing it in CodeIgniter, which is yet another completely new technology to me. The idea of frameworks – well, I mean, the idea of how to write PHP in general was new to me a few weeks ago, so frameworks are just another thing on top of the pile of things that I’m trying to pick up on the fly – with this project, that list also includes jQuery, AJAX, and Bootstrap 3 (which, to be fair, is pretty similar to Bootstrap 2, but still, it was an adjustment). As I do try and keep these posts accessible to everybody, I’ll try and explain the concept of frameworks as I understand them.

Basically, a framework is a set of conventions, maybe some shortcuts, to help you modularize and easily develop a web application. This might include things like making database connections easier, or allowing you to easily manipulate data that you wouldn’t normally use. (For example, in CodeIgniter, it’s really easy to use what’s called “session flashdata”, which is data that basically only lasts until the next time you refresh the page. I use this to pass alert messages to the user; for example, “Clock submitted successfully.” would get posted into an alert box using this flashdata when someone starts clocking time. While I could do this using raw PHP, it would be a lot bigger pain because CodeIgniter has a shortcut that makes it straightforward while raw PHP does not.

Similarly, Bootstrap 3 is a framework, but in a different sense. Where CodeIgniter is helping me on the back-end, Bootstrap helps me design the front end of the web application – what the users see when they log in to clock time. Without getting too in-depth, Bootstrap applies styles to various elements of the web page based on “classes” that are assigned to those elements. For example, in my alert above, to display the “Clock submitted successfully” message I use the “alert”, “alert-success”, and “alert-dismissable” classes. These apply styling which make the alert appear with a green background and be able to be closed on the page. Other things that I can (and do) use Bootstrap for include navigation bars at the top of the page, nice-looking tables, and form input fields that will resize based on the size of the window the page is displaying in.

Anyway, when I put this all together, it led me to a much easier method of development. Instead of using raw PHP code to write my timeclock, I put it together using function-based programming in a CodeIgniter environment. It was so much easier and quicker to do things this way, and while I still think coding in pure PHP has its benefits, especially when I was first learning the language, a framework can really speed up your development processes.

Another method that I think is worth mentioning here is something that I found myself doing a lot over the course of developing this project. When I ran into a bug, I would typically ask another programmer about what might be going wrong – however, this process would often simply involve me talking for a couple of minutes, suddenly stopping, and then saying something along the lines of “…Oh, that’s what’s going wrong. Thanks for your help!”

Apparently I’m not alone in this one, at least. Rubber duck debugging is apparently an actual thing, and is actually what I intend to graduate to later this week. (Of course, since I don’t own a rubber duck, I’ll use something I do own – my stuffed Weighted Companion Cube.)

I’ll try and post these updates more often; unfortunately, this timeclock system has been keeping me very busy! I’ll try and post some cool screenshots later, though. There are a lot of really cool features that I’m very proud of and I can’t wait to show them to you!