Friday, January 30, 2015

Detour: P and NP

In Modern Physics, we were expected to do research on quantum computing. One of the great benefits of using quantum computing as opposed to standard computing was that it reduced problems that normally would be solved in NP time to P time. After Ryan and Jonas gave their presentation detailing this, I was utterly confused. I had no clue what the terms P and NP meant, or how quantum computing might solve these problems. To be honest, after a bit of research, I still have no idea how quantum computing reduces something from P time to NP time. The math is usually not explained in most of the explanations, and the little math that is shown is filled with jargon.

Typical "simplified" post.
However, I did learn what P and NP time each mean, and how to apply them in a more traditional context. It's important to note here the P and NP are huge concepts in the field of computer science, where speed is of vital importance. In fact, there is a million dollar prize that will be awarded to anyone who can solve the problem of whether or not P = NP.

"John", you may say, "stop hyping up the importance of these three letters and start your explanation!"

Okay. I will. P and NP are both descriptions of how long it takes for a computer to solve a problem. Essentially, P stands for "Polynomial Time", which means that the problem is pretty easily solvable by a computer. NP stands for "Not Polynomial Time", which means that the problem takes a long time to solve. This explanation is super simplified, and maybe I'll go into some of the nuances in another, later post, but essentially, the P = NP problem simply means that for all the problems where we thought the solution would take a long time, there exists a separate solution that is much quicker. Thanks for reading!

Saturday, January 24, 2015

Bootstrap: An Update

A couple blog posts ago, I discussed the possibility of making websites using Bootstrap. Suffice to say, the further I look into that option, the more unattractive it seems. Using default Bootstrap, I've learned, creates sites that look almost identical. This site and this one look virtually identical. Both were built using Bootstrap, and both look too much alike for me. The other option is to heavily modify Bootstrap. If I do end up using Bootstrap to create a website, this is the option I will likely take. However, it will require a lot of time on my part.

Bootstrap, I've learned, is nothing more than a collection of alternate parts for a website. How one chooses to string the parts together is up to the user. The creator can simply agree that they want to use the kit as a whole, and create a website that looks like dozens of others. Or, they can tweak each part individually, and come up with something new. In that case, Bootstrap helps mainly with the structure and scalability of the site. It then helps less with the design and more with making the site more mobile-friendly.

3 Reasons to Start Using CodePen

While messing around trying to learn CSS, Jonas showed me a site called CodePen. After using it for a couple days, I can safely say that it's one of the best sandboxes for HTML/CSS that I've found. Here are three reasons I think it's the best way to manage software.

1. All code compiles in real time, in your browser.

A typical screen in CodePen looks like this:
All code for the site is on the side, including related HTML, CSS, and JS. Then, the site is displayed on the right, compiled instantly. Any changes in the code will appear on the site, which really helps for people learning to code in CSS like me. The fact that all code is input into the browser and that the response is immediate makes it very helpful for beginners. No extra software to worry about--just a nice site that handles all the compilation.

2. The site provides inspiration.

CodePen allows users to share their sites with others around the world. This allows users like me to explore the possibilities of HTML and CSS. Some of my favorite sites are those that help give design advice, or that showcase certain aspects of CSS. 

This page illustrates how to add dynamic elements on a page using only CSS, while this page shows the power of CSS animations. CodePen allows coders to see the possibilities of HTML and CSS.

3. The site lends structure.

CodePen helped me organize my code by combining the HTML, CSS, and JS of a project in one location. Instead of having to dig through my files and find the matching CSS and HTML files, CodePen has them linked for me. Thanks to CodePen, web design becomes easy.

Monday, January 19, 2015

CSS

Today, I finished the Codecademy CSS tutorial, and gained a solid understanding of the basics of the language. Surprisingly, it was very easy. All it takes to style a webpage is an understanding of what the HTML looks like, and some basic element names. I think the next step for me will be learning how to create good looking websites. At the moment, most of my attempts look very 1990s-esque, with black text on colored backgrounds. One thing that Sam Grayson has mentioned as a potential thing to use is called Bootstrap. I've seen the sites that Oscar's been able to make with it, and it looks pretty impressive. My next goal will be trying to make a static site using Bootstrap, with the goal of beauty, not functionality.