Tuesday, 29 April 2014

Let's try this again

Code is very dry, and for the most part, uninteresting to read in large quantities on a blog. For the most part, blog posts consisting of a lot of code just end up being blindly copied and pasted by someone scouring the web looking for the specific css they need. How do I know this? I do it- all the time. Yet, when I was looking for a guide to making columns in css I found the amazing blog A List Apart, whose quirky sketches and almost philosophical writing immediately caught my eye.

A List Apart presents practical, thematic css guides, giving the user a general set of rules and inspiration to use in their web pages, rather than a simple index of terms. Their guide to columns and page layouts describes how the proportions of the divs on a page define the page's tone and give it character.

It's also clear that they understand what is key in a website, because their website is easily maneuverable and manages to avoid being overwhelming, despite consisting mostly of giant masses of text.

This fluid and satisfying design philosophy is something I hope to bring into not only my projects, but also my code. As our UIL database project becomes larger and larger, it is crucial to effectively comment and manage the code- avoiding things such as 1000 line long route files and enormous blocks of CSS. But this is not as easy as splitting as splitting files into more javascript files with mildly descriptive filenames- for this only pushes the problem to the app.js file, forcing us to balance many more route files. So what is the solution? I have no idea, really. For now I'll consult The Pragmatic Programmer and maybe Code Complete. 

Monday, 28 April 2014

manifesto.json

For years we have been limited to two dimensions. We have been squashed flat by our languages and have been unable to flourish in the third dimension as we have so long desired- but no more! We shall thrive and reproduce, gaily prancing around in multiple planes. The Z-Axis gives us the ability, nay, the god-given right to express our web pages in a multitude of additional ways. For how long have we seen boxy, single-dimension pages? No longer, for we have been given a gift of vertices and CSS3. Z indices and transforms will revolutionize the way we experience the internet, and will gift unto us a new era of html.

Web workers of the world, unite. You have nothing to lose but your chains!

Friday, 25 May 2012

...

First of all, the class certainly prepared us for the AP, without question. (Not that that's a very big accomplishment, I certainly hope the AP does not accurately represent the content covered in a college class.) Second of all, despite any problems I had with the class, I very much enjoyed it as a whole.


This class should not be any simpler. In the description for the course it says that computer science requires prior knowledge of java/another language. If anybody requires a longer introduction than the one given, then they should take computer programming first. I understand that oop and programming in general can be hard to teach, but if somebody is having difficulty learning about them they should instead take an introductory course. If the course were any simpler, it would seriously deter those who did understand the concepts. 


Although self-motivated projects are inherently engaging, teacher guided projects will always be faster and ultimately more informative. Self guided projects are usually guided through online resources, and thus there is no guarantee I will be able to finish said projects. The guidance of a teacher, or at least a single well-written walkthrough, will both increase the productivity of a student on a project and what a student learns from a project. This leads into my next idea,


Have more projects. Pong was fun to do; having a clear set goal for a project, and the knowledge that I have to finish said project, is extremely fun. More so, everybody was working on the same project, and so getting advice on an issue was extremely easy. Pong itself was relatively simple, more complex projects would certainly be welcome, especially if it required a lot of thinking about how to efficiently code the program. There was little effort actually put into the general method I would use to make pong work, instead the challenge was simply working out bugs.


Not enough focus on efficiency and general coding practices. In the first coding class I took, I was told that the question is not whether you can make a program do something, it's whether you can me it efficient. This isn't really something that was ever mentioned in this class. The use of profilers, for example, to find computationally heavy spots in code should definitely be talked about in class.



Saturday, 19 May 2012

Last 3 weeks

Two weeks ago I was primarily studying for the AP exam, and after taking the AP I have to say that I did not need to. The practice materials had some content I needed to look up: ternary operators, parts of the string class that I don't normally use (a lot of this), and some other miscellaneous code. However, the AP itself had very little even remotely complex content. A specific question I remember quite well had a list of 3 search algorithms which, in theory, found the largest value in an array. One of these, however, used -1 has a default that would be replaced by the next value in the array if it was stated to be the maximum value. Because of this, if -1 was the largest value in the array (there was no precondition that would exclude this as a possibility), then the array wouldn't work. This was the only question that had this small of a problem and thus I thought it might be designer oversight rather than a hard question. Other than this, the AP was fairly basic. This isn't to say that it was badly written, it covered the content it was meant to cover and did it quite well, just that they don't seem to be grading high school APs on too high of a bar. (Watch as I get a 4...)

Outside of class, I've been working on a quadrillateral-based 3D engine. To map the textures I am using affine transformations, a very low-cost method of perspective transformation. The reason this is not used normally is that it isn't entirely accurate and thus must be modified, but this required more processing power. The affine transform is more acceptable on quadrilaterals, thus why I decided to make a quadrilateral-limited engine. A while back I derived a series of equations to run this off of, using perspective matrices. However, I've been experiencing some weird image warping with this, so I need to re-derive the equations. Going off on a bit of a tangent, but learning about the actual application of matrices in computer science has shown me something about how idiotic it is to solve matrices by hand, as taught in algebra 2.

I've also been studying for UIL on my own time... when I read a question which required you to figure out the sorting algorithm a program was using based on the time it took to execute it hit me just how much there was study. Big O notation and sorting algorithms in general seem to be a huge part of the higher up UIL exams, so I'm putting a large portion of the time I spend studying into studying these.

Monday, 16 April 2012

Gridworld

The Gridworld API is really strangely set up and I don't have any other commentary on the subject. The test seemed reasonable and we didn't really do anything else.

Friday, 6 April 2012

Worksheets!

I was sick Monday of last week, so I only came to class on Tuesday, during which I did 6 worksheets and 2 labs, and I don't have a lot of commentary on the subject other than that the worksheets seem very repetitive, and providing the same methods with many different input values doesn't seem to be teaching me anything.

Java, not in 3d

Last weekend, while I was sick, I made a very small 3D engine, using a very primitive method used by very early 3D engines. This bases around the equations
x = x1/z1
y = y1/z1
where x and y are the 2D points to be displayed and x1, y1, and z1 are the input coordinates for the 3D point. This equation simply scales the x1 and y1 coordinates of the 3D point by the z1 position, in order to create a sense of depth. The "camera" is centered at the origin. Then, one does a series of modifications to make this work with alternate directions, camera positions, and field of view. Up until now Daniel has been looking through different forms of 3D rendering and I can definitely see myself going down the same path.