Links vs Buttons

Now that I’m writing more websites, I’m trying to make them better. A lot of it has to do with making them look better so that people have a better (UX) user experience. I’ve been using bootstrap more, which is nice. But now I need to get into more nuts and bolts stuff.

The question then is, when do you use a link and when do you use a button. Links are easy. If something is just navigation, use a link. If I’m looking at a page and want to move to the edit page, I should have a link, probably called edit. Buttons are for things that would change the database behind the site.

A simpler way to think of the difference between the two is to use a link if that’s not really going to do any harm to the website. If there is a chance to do some damage to something, use a button.

By default, rails uses links for just about everything. Specifically, scaffolding defaults to using a link to delete an entry. Based on the above information, I should be using a button there. So what do I need to change.

Here’s what the basic delete link looks like:

<%= link_to 'Delete', applicant, method: :delete, data: { confirm: 'Are you sure?' } %>

To change this to a button, I’d user this:

<%= button_to "Delete", { action: :destroy, id: }, method: :delete, data: { confirm: 'Are you sure?' } %>

Note in both of these lines, I have to specify that the method we want to use is delete. In rails, by default, a link_to method looks for /applicants/new (for example) using GET. The button_to method looks for /applicants/new using POST.

I Prefer Fixes

I bought parts for some new computers for our engineers at work. Everything arrived yesterday, so I started assembling them. When I opened up the video card that I bought (PNY NVIDIA Quadro K1200), I noticed that the bracket was shorter than the standard bracket. I’ve purchased many video cards over the years and normally, the box will include another bracket so that it can be used in a regular sized case. However, I quickly found that there was not another bracket in the box. I looked a bit online and found that this particular card was designed for a small form factor case. My first issue is that that information should have been much more visible on the webpages where I bought it. Anyway, since I bought the cards from our campus vendor with a purchase order, I really didn’t want to try to return them because it’s a big hassle. So my first solution was to simply take the brackets off. I could put the card in and use it without a bracket without a problem. The next step was to see if I could make a new bracket, which quickly sounded like a bit more work than I wanted to do. I returned to Google and found someone who said that they had an older NVIDIA NVS 510 card. He said the bracket from that card fit the K1200 perfectly. I didn’t have any NVS 510 cards around, but more googling led me to a local place that sold that bracket for $20. I ordered them and got them in two days. They fit perfectly.

When I first found that there was no full size bracket in the box, I decided to send email to PNY asking what the part number for the full size bracket was. I figured they were just being cheap and were going to make me pay for the part, which I would have done. I actually ended up sending two emails to PNY because I couldn’t tell if it went through on the website the first time. So I ended up getting two responses from PNY. The first guy was apologetic, but nice and the second guy was basically a jerk. After I got my new bracket and found it worked fine. I decided to reply to these two to let them know that in fact, there is a bracket that fits and sent them the link to the one I bought. Ok, yes and I was a jerk to the guy who was a jerk to me and I tried to be a bit nicer to the first guy. The jerk responded as you’d expect. Then followed up by explaining that I was voiding the warranty because I was disassembling the card. I was going to become even more of a bitch in my response, but decided to drop it. What cracked me up though was how both of these guys eventually got back to me saying that I was voiding the warranty. This is hilarious. To replace the bracket on a video card, you remove two screws and then screw the new bracket back on. I’m pretty sure that if I needed to return the card for a warranty repair, I could again remove the two screws and put the smaller bracket back on. And I can’t imagine how PNY would figure out that I disassembled it.

Anyway, I’m quite happy with how things turned out because I fixed the problem. In general, people who just point out problems (like these two help desk guys) are people who I don’t want to work with. People who can solve problems are my kind of people. I prefer fixes.

FYI, I bought the bracket from a company in Illinois called Compeve. Here is the link to the bracket.

Full Circle

Lathe are strips of wood that are nailed to studs when building a wall. Before drywall was invented, plaster and lathe were how walls were put up in houses. My house had all plaster and lathe walls on the first floor. Here is a picture of the back of a plaster and lathe wall, as I was gutting the room that is currently my bedroom.


While gutting, I broke up all the plaster and then tried to save all the lathe to use later. Well, it is later and I’ve been doing some work with the lathe. The first step was to either plane or sand the lathe clean and cut all the edges. This would make it easier to glue the pieces together to make a board. This picture shows some sanded lathe in the back and lathe that still needs to be sanded in the front.


Next I glued a bunch of pieces together to make a board.


I then cut the edges of the boards and planed them to around 1″ thickness. Here I’m testing a few different stains on the boards to see how they would look.


And this is the first piece of furniture that I made with my lathe. My intention is for it to be a stand for my tv. However, I’m not sure that it’s going to be wide enough. So it might just be a bookshelf. Interestingly, I used two stains on it. The shelves were done with the stain espresso, which I had tested previously. The sides were done with provincial, which I ended up liking when I was at the store. I think I may use provincial more, though I may decide to not use any stain on my next project.


It won’t win any design contests, but I’m quite pleased with how it turned out. I very much like the idea of taking garbage and making something useful out of it.

And here it is, in my living room with a tv on it.