Posts Tagged ‘Processing’
End of Fourth Week
It’s getting a little too close to time to leave for me to do a whole post, I think, but I did want to put out my travel details so that people would know where I am when, so here goes.
Itinerary:
Bus:
Barcelona to Girona Airport
Departs at 8:30am – Arrives at 10:00am
Flight:
Girona (GRO) to London Luton (LTN)
Flight FR3769 – Sat, June 06 – Departs at 11:55am – Arrives at 1:15pm
Hostel:
St. Christopher’s Inn – Hammersmith
Check in: Sat, June 06 – Check out: Tues, June 09
Train:
London Euston Station to Liverpool Lime Street Station
Tues, June 09 – Departs at 8:07pm – Arrives at 10:20pm
Hostel:
Hatter’s Liverpool
Check in: Tues, June 09 – Check out: Thurs, June 11
Flight:
Liverpool (LPL) to Dublin (DUB)
Flight FR443 – Thurs, June 11 – Departs at 6:30am – Arrives at 7:20am
Hostel:
Jacob’s Inn
Check in: Thurs, June 11 – Check out: Sun, June 14
Flight:
Dublin (DUB) to Reus (REU)
Flight FR1116 – Sun, June 14 – Departs at 12:15pm – Arrives at 3:45pm
So, I’ve been making a lot of chocolate milk this week. I got a bottle of the Cacaolat brand chocolate milk, and I really enjoyed it. It’s more chocolatey than typical U.S. brands, but kind of expensive for the amount of it you got. So, instead, I’ve started getting UHT white milk, which isn’t initially chilled, can sit on a shelf for up to a few weeks, and is cheaper, and I got a kilo (2.2lbs) of chocolate Cacaolat brand powder. The milk is just as good as the bottled chocolate milk, and I get a lot more of it for significantly less money. Unfortunately, the chocolate milk is so delicious that I went through a liter of it in two days, so I’ll probably have to back down on that a bit.
We went to McDonald’s this week, too. It was interesting. I’ve since seen a few more McDonald’s (though still only eaten there the once), and they’re actually nice on the inside, about on par with typical American Starbucks. We walked by the National Theater on the way back. I’d definitely be interested in seeing something there. It’s a very nice, elegant building.
My entrepreneurship class is going pretty well at the moment. I hope we work on some more of our companies and products stuff over the break, but I have some guess that we probably won’t. It’s really excited me to want to start my own company after I graduate, so I suppose I’ll have to take that option into account once I get back home.
We started covering the Fourier Transform in algorithms, and it looks pretty neat and relatively useful. I couldn’t quite execute the algorithm after just the lecture so far, but I’m looking forward to forward to hearing some more about it and how it works. The gist is, as we’ve covered it, that you can somewhat easily go from a set of points to a polynomial and back. I probably won’t go into it in the kind of detail that I covered some of the other algorithms because it’s so prolific, you could probably understand enough of it from a source like Wikipedia.
In Computational Photography, we covered High Dynamic Range (HDR) imaging. First, some examples. The idea here is that there is a lot of color lost in images, especially outdoor ones. Regions of an image come out too bright (super white) or too dark (super black) because of various reasons involving your lighting. If you want to get all the color in all the regions, then, you have to take multiple images (unless you have a very, very nice camera) at different exposures. After that, you take the pixels from each image that aren’t over or under exposed, and you generate a new set of pixels from them. That new set is your new image with color in all the right spots.
Lastly, I tried to make lemon chicken the other night. It went over pretty well, but I didn’t have any white wine. I think that would’ve added a lot to the flavor. There’s some good and cheap white wine sold down at the Mercadona, I just have to remember to pick it up before the next time I attempt to make the dish.
End of Second Week
Well, I had a pretty good second week here, probably a lot better than the first, to be honest. There are once again still a ton of photos to be published and captioned, and hopefully I’ll get some of that done later today.
So, I believe I last left off around Wednesday of this past week. On Wednesday, I had a relatively long day. Algorithms class started at 9:00 AM, followed by Barcelona Leap (Entrepreneurship) at 10:30, a 30 minute break at 1:30, and then Ethics from 2:00 PM to 5:00 PM.
Algorithms was generally good on Wednesday. We spent nearly the whole hour and a half going over the homework from the night before, and everyone kind of got into it. On the last problem, which took around 40 minutes of discussion, we were trying to find a way to tell if there is an odd-length cycle in a graph. For those who don’t remember their graph theory, a graph is essentially anything that can be drawn as a whole bunch of circles with lines connecting them. If you took a city map, the intersections of streets where you could from one to another would be a circle, and the streets would obviously be the lines that connect them. More formally, the intersections would be nodes and the streets would be edges. It’s a super useful concept in computer science. Additionally, a cycle is anytime you could drive away from place A and get back to place A without repeating the exact same path. And finally, an odd-length cycle would then be to leave place A and get back there having only crossed an odd number of intersections in the process. Anyway, the class was nearly done coming to conclusions, and I thought of a way that what we were deciding seemed wrong, so I asked and put it on the board, which basically required nearly the rest of the class to discuss more. Professor Furst got about 10 minutes of actual lecture in edgewise at the end.
This discussion and other similar ones took place a bunch this week, so I won’t bore anyone with all the details, but when Merrick finally showed us the solution to the problem, we were awestruck by its simplicity. Feel free to try to figure out how to determine if there is an odd-length cycle on your own first.
If you’re familiar with Combinatorial theories, then maybe just saying 2-coloring the graph sparks it for you. The gist is that you color one node, let’s say blue, and then you have to color it’s neighbors (all the ones connected by lines) green. Well, now that you’ve colored those green, you have to color all of their neighbors blue, and you keep going alternating like that. Well, if there is an even-length cycle, the colors will line up, but if there is an odd length cycle, then you’ll get to an already blue node and try to color it green (or vice-versa).
Okay, I lied, one more. How can you, algorithmically/programmatically solve xn (x to the n power) in log(n) time?
Once again, Merrick pulled out some ninja math and gave us this. I’m going to write it in more or less the same notation he used.
// Invariant: X^N = z(x^n)
z, x, n := 1, X, N
while n ≠ 0
if n is odd -> z, n := z*x, n-1
▯ n is even -> x, n := x*x, n/2
fi
return z
You’re welcome to take a minute to understand this and ask questions if my notation is unclear.
Leap was also awesome both times last week. I’ve gotten used to Merrick’s no laptop policy, and he’s plenty interesting, so it was a good time. We first performed a technique called Market Gap Analysis. The technique basically lets you identify a market to whom you would like to sell a product. As we learned, it’s entirely a mistake to say “X would be a really cool product. We should make it, and I’m sure people will buy it”, as this succeeds only about 5%. Instead, you should find a group of people that have a need and sell to them a product that they can use. Additionally, innovation is probably necessary since you’re relatively unlikely to have invented a new market. Our group identified the Entertainment sector as the area we were going to focus on, then the groups of children, teens, college age adults, and adults. We expanded each of those, but chose teens as emo, goth, punk, prep, fangirls, and a few more. The group decided on fangirls (girls 8-18 that have an obsessive love of different media such as bands, book series, movies, and celebrities) as a market we could analyze and serve with the members we had.
Computational Photography was pretty decent also. The biggest thing we discussed was JPEG compression, which is basically a way that computers and cameras can take very large raw images and compress them down to just a few megabytes without making the pictures look terrible. The gist is just that you analyze the pixels and throw out things that are relatively uncommon. This works really well on real photographs, but not so well on computer generated images.
In terms of travel, Kevin and I went to La Sagrada Familia and actually went inside this time. We took some great photos, but I have to say, for 11€ for entry and 2,50€, I found the experience slightly disappointing. I don’t want to downplay how beautiful and awesome a structure it is, but it’s significantly less complete than I could’ve imagined. The inside, except for the ceiling and a little bit of stained glass, is scaffolding. The most complete and amazing part is the outside, which can be seen from the street just as easily. Going up to the top was certainly neat, but there was essentially one walkway and a couple balconies that had good views, but I don’t know if they were an extra 2,50€ worth of views. Lastly, there was a museum on the bottom most floor that was included in the initial 11€ that was rather nice. Definitely not one of the best museums I’ve been to, but it did have some neat exibits. Overall, I’m glad I went, and I would recommend people to go in the future, as it’s neat to get a piece of the history of the building as it’s being created, and it’s only going to get more complete.
I’ve been trying to decide where I want to visit on the break next week. Most of Barcelona Leap group seems to be going to London, and that sounds like it would be fun. I would kind of like to be able to have a real conversation with the locals. Brian and Vlad have said they were going to Paris, which also seems cool, but maybe somewhat expensive. I kind of wanted to go to Germany, even, but I think it would not be best to go alone, so unless I can find someone more or less today that wants to do that, I’m out of luck this time around.
Went out Sunday night for Kevin’s birthday. It was a pretty good time. We wandered the city and found some new places, and got some ice cream. It was just the two of us, as we were both a little burnt out at the time from big group things that didn’t go as pleasantly as possible. We also went out last night and found some delicious ice cream next to the picasso museum.
On a final, and unhappy note, I found out last week that Stephan’s father passed away. I’ve tried calling him a couple times, but I can’t tell if I’m even getting to the right place, since I don’t think his message had his voice on it, and he put the menu in Spanish, if I recall correctly. So, I think I’ve left a message, but I’m not sure if he got it.
Week Two
Well, so far, this week has gone pretty alright. I spent a while over the weekend configuring this blog, and I’ve finally got all my Google Webmaster and Google Analytics stuff up and running. All the blog software seems to be working nicely and such. I started a Twitter account, like I said I wouldn’t do. I went back and forth on whether to make it public or private and finally settled on private. I’ve already got this public blog for information sharing, so I’ll probably just limit that twittering or tweeting or however the kids say it these days to friends who already post that kind of stuff. I finally got an account because I was following a number of public feeds by visiting all their pages, but that got to be cumbersome as I discovered more of them to read.
Anyway, the only place I really went this weekend was La Sagrada Familia, an old church that’s still in construction because of it’s intricate and beautiful design. They’ve been building it for quite some time, and it’s gorgeous. I’ve got a few pictures that I’m going to post of the outside, and hopefully I’ll see the inside soon (They were closed when I went by, but it’s close). I also went on a random walk after I passed by, and it turned out pretty interesting. I’ve posted most of the pictures from the walking, but I think most still need captions and stuff. I’m trying to find the balance between posting text and posting and captioning images. I imagine people want it somewhat proportional.
Today, Kevin and I hiked up the mountain (only trekked through minimal vegetation, mostly streets and stairs) behind the college. Also, for the record, in case I was unclear before, I’m attending Universitat Politècnica de Catalunya, Polytechnic University of Catalonia, or UPC. I think I may have said University of Barcelona before (which I believe was what we were initially told). Anyway, our hike was good, and we got a lot of good pictures that I’ll also need to post.
Overall, classes have gone well the past two days. Vlad was the star of Ethics yesterday with a couple crazy questions and playing a lot of Devil’s Advocate with people who weren’t aware that’s what he was doing. We were assigned the relatively simple task of picking 5 questions that we could say “Should _________”, where the questions are ethical dilemmas that might be faced in the information technology fields, and there shouldn’t be a concensus on the answer, either. So, should copyright laws allow for free copying of media? Should ISPs be required to be net neutral? Should the government be allowed access to private video feeds? Those kinds of things. That’s due tomorrow, but I’ve already turned it in.
We had a computational photography assignment that we did that I was rather proud of since I went above and beyond. Pretty much everyone was impressed since I implemented UI elements in Processing where there were none before. It’s probably not that impressive on the whole in the sense that most people just expect programs to have UI elements, but in this context it was pretty nifty. I might try to post the applet and source at some point.
Algorithms today was alright. Apparently Merrick is not fond of laptops open in class. I definitely get why someone would enact a policy like that, but I hadn’t really brought the supplies to take old school notes because I didn’t think I’d have to, and it’s not my favorite thing to do. I felt bad for Brian, who wanted to take notes on his tablet. There’s a reason he carries around a tablet, and I’m fairly certain it’s not to take pen and paper notes. I also feel bad for people whose only copy of the books is the PDF version and not the paper version. It’s nice to follow in class with the text, and you can’t do that if you’re not allowed to have the book open on screen.
Photography was more or less fun today. We went outside and chilled in a garden playing with focal length, aperture, shutter speed, and all on the cameras and taking different pictures. I might post a couple that I liked from what I took.
Anyway, long day tomorrow, so I guess this is it for today.
End of First Week
It’s the end of my first week in Spain, and overall it’s been pretty enjoyable. I’ve walked quite a bit of the city for the time I’ve had, and I have to say that it’s rather beautiful. I’m probably first going to cover what happened in class, then probably roaming the city, then what I did to the blog. Also, after this one, posts will likely get a little shorter, as I’ll not be covering many days at a time.
On Wednesday, May 13th, we met outside Onix at 9:15 with Sabir (one of the program coordinators and instructors) and walked to the Metro. We rode the L1 train down to Espanya (Not España, mind you, this is Catalan), switched trains and got on the L3 and rode to Zona Universitária. From there it’s a pretty short walk up to the school. The whole ride takes about 40-50 minutes depending on walking speed and train timing. The Barcelona Metro (abbreviated TMB for Transports Metropolitans de Barcelona = Metropolitan Transportation of Barcelona. TMB Maps) is significantly better in pretty much every way to Atlanta’s MARTA rail system, other than the fact that MARTA has many more actual seats. Having fewer seats does allow for many more passengers, and the Metro is quite often crowded. Fortunately, Spanish people mind less about being touched, and willingly cram in.
Anyway, we had an orientation and terribly boring tour (sorry tour guide lady, not your fault, I just wasn’t in the mood to see all that). Afterwards, those of us who weren’t taking spanish left.
On Thursday, the first day of classes, I attended CS 3510 Algorithms with Merrick Furst and CS 4475 Computational Photography with Frank Dallaert.
Algorithms is probably going to be a decent class here (I can’t say the same for what I’ve heard about taking it at Tech). Merrick is rather engaging and stops at appropriate intervals to check that students are “tracking”, or following and understanding the lecture (Never heard that used in this context). We broke down mathematical addition into its smallest steps, and discussed Big O of the operations. Overall, it was a pretty enjoyable class, and it will probably be worth the trouble of waking up at 7:30 AM to get to.
Computational Photography was equally as interesting in different ways. The main things I remember at this point were that we all went to the front of the class and had our picture taken. Below is the average of all of our faces using the kinds of simple techniques we’re going to learn in the class. Click the picture to see it’s Flickr page. We were all required to have Flickr accounts for the class, so mine is peisenmann3 (If this isn’t right, check my about page for an update).
After that, we all downloaded Processing, split up into groups, and began to work on the assignment he gave to take a picture and separate out the red, green, and blue channels. My group was the first group finished, and we produced the following image:
Professor Dellaert was a little nit picky of code that was written. He gave one group a hard time about using a variable named orig instead of original, which I have to say is pretty close to the nit pickiest thing you could bring up. It looks like it’s going to be a good class, though, and I’m probably going to start my half of the group project tonight. My teammate is Kevin, the guy on the left in the above photo, and I think the others will be in my group permanently, but it was a bit hard to tell.
On Friday, I had Algorithms again where we expanded our talk to multiplication and some basic graph theory. Merrick posed a question to us that no one was able to answer effectively. The question is:
Given that you have N nodes and E edges in a connected, undirected graph, how can you go from an edgelist to an adjacency matrix for a cost of O(E). Also, the memory for the adjacency matrix is not filled with nulls or 0’s, as that would take O(N) time. Additionally, assume the graph is relatively spare (N is large, E is small).
So, the main trouble is that the matrix has any kind of nonsense in memory, and you need to be able to represent that there is a connection (remember, it’s undirected, so any indication of connection is fine) without it getting trampled on by garbage still in memory. Feel free to take this time to comment on this post your answer before reading what was provided to us, if you like.
The first mediocre answer someone came up with was:
If you pick a random 256 bit number, there are 2^256 or about 116 quattuorvigintillion (seriously, 1.16*10^77) possible numbers that could be. Thus, the chances that memory would contain this number are pretty low. If the average computer executes about 1 billion instructions per second (which Merrick says it does), then it would still take more than 7 * 10^63 millinea to hit all those numbers, not that that’s relvant. Since random is random, though, I don’t like this option because there is still the risk that your matrix would be wrong because of random not being unique.
Finally, Merrick shared with us this nugget of wisdom:
Add a stack. You have the address of the top and bottom of the stack. Every time you add an entry in the matrix, add an entry in the stack and move the top of the stack up. The entry in the matrix should be a pointer to the entry in the stack, and the entry in the stack should be a pointer to the entry in the matrix. This way, you know for certain that the stack has absolutely 0 junk in it. If the stack has no junk, then you just check does the matrix entry point to a stack entry, and does that stack entry point back. If any of that fails, then no connection on the graph, or if they pass, then there is. Pretty foolproof and nice as far as I can tell. The biggest downside I see is that now you’ve caused a storage system that was only optimal when nearly full and poor when sparse to now be poor when sparse and nearly as poor when full, since you’re doubling the entries.
So, that was kind of neat.
After Algorithms, Merrick went straight into Barcelona Leap, which is an entrepreneurship class with a computer related focus. We mostly spent the time talking about value, and Merrick got us to look both internally and externally for how to increase or realize our value. We all divided into random groups, then each group spoke about its members. Afterwards, each group wrote down how much they’d invest and in which group and for how much of that group’s shares (thinking of them like companies, 5% of their shares, 50%, 20%, etc). Merrick collected the results on paper, and only shared the totals that were obtained, but not which groups had which totals. One group had 10 votes, nearly half the votes of the class, and one group only had 1. Interestingly enough, Merrick said he would have picked that group over the others to invest in personally.
Lastly, in terms of classes on Friday, we had a specially scheduled Ethics class. This class was taught by Frank (same guy who teaches 4475). Normally, that class won’t meet on Fridays, but they thought it was important to have at least one meeting of each class this week, and that’s the only one that doesn’t normally occur on Thursday or Friday. The class is supposed to be divided into two parts, both of which seem like they’re going to be less interesting to me than his programming. The first part, ethics, we didn’t really cover much at all. The text book’s first chapter is mostly just an overview of technological improvements since around 1600, and that’s all we talked about in class. Grant, one of the TAs, drew a timeline, and Frank mostly filled it in with handwriting that I coudln’t particularly read. The whole thing took nearly an hour, and clearly I don’t remember most of it. There was a break, and we came back with the arguments portion of the class.
This part was a little better. We read a paper I’ll call The Gordon Adams Petition. The gist is that this guy, Gordon Adams, is 43, and he is pursuing a degree in law. He wants to be able to attend law school at a certain time, and given the requirement that he take certain math classes, he won’t be able to make it. He offers that he can take other classes in their place in order not to reduce the number of hours needed for graduation. He also offers the testimony of a couple professors and lawyers that he won’t need the math, and that he’s an architect of sorts, and doesn’t need the extra math. The class was divided into groups, and we talked about the problems at hand of whether or not to allow his petition. The first 3 groups to present said no to the petition, while the last 2 said yes.
If you have any thoughts, like before, you’re welcome to post them in a comment before reading on. Also, my group’s points won’t be in a spoiler box like before since this is more of an opinion kind of question anyway.
So, my group came to the unanimous decision to deny his petition on the following grounds. First and most importantly, if taking this math is going to cause him to graduate later than he wants, how is taking a different class going to help? He continually makes the argument that he doesn’t need the math, but doesn’t offer to take any kind of placement test to prove, and rather offers anecdotal evidence instead. If this is solely a time thing, he offers no evidence to that end, and it indeed has a strong feeling of a dislike of math rather than a lack of need. Additionally, he offers opinions of lawyers and professors as to whether he needs the math. The subset of people he’s asked are relatively small and relatively irrelevant. A thousand people might believe contrary, first off, and additionally those people did not decide the requirements; it would have been more appropriate for him to ask a college board member why it was required than random professors. In the end, all he offers is his word that he is good enough at math, and that he will not bring dishonor to the college when it clearly sounds like his distaste for math is more likely the motive of the petition.
You’re welcome to read the paper and disagree, as that is what arguments is all about.
As for roaming the city, both Thursday and Friday we walked back. On Thursday, we took a rather convoluted path back to Onix. We stopped to get food along the way, and the waitress was really nice and friendly. I got a lomo queso, or pork and cheese sandwich. The pork was more like thinly sliced porkchop meat than ham. For whatever reason, the waitress gave us each (there were five of us, Jason, Thomas H., Thomas L, me, and Kevin) what Krystal helped me determine (over the phone) was probably Apple Ice Wine. If that is the case, the stuff runs like $8 per shot, so we got a good deal on that. I’m still not sure what or who caused her to want to give us free drinks, but I guess free is free. Unfortunately, the long and winding nature of the path we took caused it to take nearly 3 hours, so Jason only had a few minutes to sit before having to leave again to Spanish. On Friday, we took the straighter path back and it was much less eventful. This time it was Brian, Vlad, Thomas H, Thomas L, and me. The only stop we made was in the Vodaphone store, but since I was the only one that needed to go, I decided to wait. Brian also encouraged me to see if I could unlock my phone from codes found online. It turns out that I was able to (it’s just a plain samsung, so I didn’t think it would be too hard). I later went back to a closer Vodafone store and got a Sim card and plan.
Thursday night was the night of the big Barcelona football game. Barcelona won 4 to 1 and tonight their victory of El Copa Del Rey was sealed as Madrid lost to VillaReal. Ben, Brian, and I watched the game in a hole-in-the-wall bar. We were far enough from Plaça Catalunya (Catalunya Plaza, more or less a giant median/park thing) where the game was being projected that we missed the ensuing riots. Riot police were called out to scatter the people after they’d had their time to celebrate. My roommate was there and got some pictures that hopefully I’ll be able to link to later.
Alright, time to wrap this up with what I’ve done to the blog. I’ve installed quite a few plugins, namely Advanced Spoiler, Akismet, All in One SEO Pack, Global Translator, Google Analyticator, jQuery Lightbox, NextGEN Gallery, ShareThis, WP Greet Box. All in all, I like the things I’ve installed, and I’d recommend all of them. As noted on the about page, my theme is no longer Barcelona Metro because it was not compatible with NextGEN Gallery as far as I can tell. I tried to make it work, but it wouldn’t so I gave up and installed a different theme instead. This one is called simplev. I might make my own eventually, but this will do for now.
























