Firefox 3.5 doesn’t warn when closing mutiple tabs
As most techy people did, I updated to Firefox 3.5 when the stable version was released. (I also keep a copy of the latest trunk version, but I wouldn’t typically blog about its bugs). I updated my addons and went back about my business. Well, I’ve been browsing for a while now, and I finally got annoyed with the fact that Firefox was no longer prompting me when I closed multiple tabs. That is to say that I use the hotkey cmd+w (ctrl+w on Windows) to close tabs. Well, on Mac cmd+q quits the application. You can see my frustration when I accidentally close all my tabs and lose everything I was doing when I just wanted to close a single tab. After losing all my tabs a second time, I finally decided to investigate and fix it. I found these two articles which led me to some semblance of an answer.
https://bugzilla.mozilla.org/show_bug.cgi?id=419009
I knew about the settings in the Firefox > Preferences menu (Tools > Options on Windows), but changing them seemed to have no effect. I disabled Tab Mix Plus, one of my favorite Addons for Firefox, because I thought it might be hampering the normal fox behavior, but that didn’t work either. Finally, I went in about:config and manually changed the configuration values. Whenever I close my browser, I like to have all my history, cookies, and cache cleared just because I don’t mind retyping my passwords, and I find it keeps Firefox running in ship shape. Firefox, however, seems to be moving in the direction of not having you clear things and just restoring everything you were previously doing when you closed it. That doesn’t work for me. Anyway, here’s the settings I set:
Open a new tab and go to about:config. Accept the warning if you see it.
In the filter box type browser.warn and set both browser.warnOnQuit and browser.warnOnRestart to true.
Next, put browser.startup.page in the filter and set its value to 1
I realize you’re supposed to be able to control all these settings from the preferences menu, but changing everything in the menu seemed to have no effect for me when I did it, which may be the real bug here. Hopefully this helps.
Dublin
We got to Dublin early this morning around 7AM. Unfortunately, this was a little too early to check into our room, so we had to do something to kill the time. Even though we couldn’t officially check in yet, they let us eat the complimentary breakfast, which was nice. I wasn’t too tired, but after breakfast, most everyone else took a nap on some couches in the lounge. I guess I mostly just checked email and wrote the Liverpool post. Speaking of the Internet, there was free wifi in the building and the rooms, so big score there.
I finally woke everyone up from their nap around 10:30 AM when it was time to go on this free walking tour thing they had. We followed this redheaded Irish guy around for 15 minutes where he mostly just talked to one person. It was kind of terrible. Then, we actually arrived into a big crowd only to realize that what we just experienced wasn’t part of the tour, he was just getting us to the beginning of the tour. So, we adjusted our disappointment meters back down and gave him a second chance. Fortunately for us, it was awesome from that point on. The guy was really entertaining and shared a lot of facts about Irish history. He made some jokes about the Irish not being very good at naming things or planning, but all of his stories were really good.
Apparently in Ireland, they don’t say “What’s up?” or “What’s going on?”, they say “What’s the crack?” While crack does also refer to crack cocaine there, unless you’re using it in a drug related context, crack typically refers to fun or a good time. In many of his stories, Ireland “called” some other nation (obviously a jest in some cases since they wouldn’t have had phones at the time). Every time he did that, it was “Hey Spain, what’s the crack? What do you think of the English?” or “Hey Germany, what’s the crack? We think we could use your help.” So, we all found that pretty entertaining.
The tour ended up being rather long and afterward we went back to Jacob’s Inn, checked in, and took a nap. The room was a 10 person room, but our remaining two roommates wouldn’t be checking in till later that night. There was one bathroom + shower in the room, and there were couple community bathrooms + showers in the hall, which was rather convenient. By the time we got out again, we were really hungry. We stopped at this Georgian (as in the country) restaurant where they had a student discount and had all you can eat. It was totally delicious, and we certainly ate our fill.
I was starting to get a little burnt out on people after spending the past week in close proximity to 8 individuals, a couple of which I found that I didn’t quite see eye to eye with, and I needed to call Wachovia one more time about a fee that seemed incorrect, so I went to the lounge downstairs, which was quiet at the time. After I got all set up, I made my call. It turns out that the fee was supposed to be there, unfortunately.
I chilled out in the lounge for a while and played couple games from Kongregate.com, which is a pretty easy way to waste time when you’re feeling a bit brain dead. I might’ve watched something from Hulu or the major network channels, but those don’t work over here. Bleh, stupid licensing. Anyway, I was enjoying the quiet when a lady lead herd of children in to watch a movie on the big projector screen. I still wasn’t quite in the mood to head back yet, so as I played my game, I watched most of Johnny English. I’m not really sure how those children choked it down, but it seems that they actually enjoyed it. It’s a spy movie parody starring Rowan Atkinson of Mr. Bean fame. The movie was dreadful to say the least, and I don’t know that I’d even consider exposing children to it. IMDB’s rating of 5.7/10 is generous, and I think it deserves closer to a 4.7/10.
Liverpool
Today was our last day in Liverpool. We were be here Tuesday and last night, and the today, we’re flying over to Dublin.
So, we leave the train station where we just arrived from London. Outside the station, nobody knew exactly what direction to head in, and it turns out that whoever got directions only got that “it’s really close once you leave the station”. As it turns out, that’s not quite the case. We picked the direction with more lights and headed that way. It took a while to get to the first corner, so when we reached it, it was time to figure out where Hatter’s hostel was. There was a bar across the street, so a couple of people went over to ask for directions. Apparently, they got an earful. First, they asked the bartender, and he started out fine. He got stuck though, and asked one of the waiters. Apparently multiple waiters ended up talking, and so did some of the regular customers. Eventually, we see them come out with an older gentleman who we learned was named Joe.
Joe chats with us for a minute as he ponders the directions. Shortly, a woman walks up to us. She doesn’t look homeless, but she’s definitely not in her right mind, most likely drunk from the same bar. She asks for 20 pence to make a phone call. So, one of us asks her if she’s knows the way to Hatter’s hostel. She says she does, so Joe gives her the 20p (They don’t actually say “pence”, they just say “p”, if I haven’t mentioned that before). Ben, however, didn’t notice that she’d already been given the money, and proceeded to give it to her himself. We asked her where Hatter’s was, and she kind of blankly stared at us, so Joe, deciding she didn’t really know what she was talking about and with Ben having given her additional 20p asks for his money back. “You didn’t give me 20p,” she responds. I don’t know what’s going to happen, but this sounds like it could be headed in an amusing direction. “Yes, I just did,” Joe retorts, his slightly intoxicated, Liverpool accent thick. “No, ya di’n't,” she replies again. Finally, apparently frustrated, Joe shouts “P*ss off, ya f*ggin’ slag!”
Anyway, we ended up getting directions 3 more times, multiple of which mentioned a “wig wam” shaped building. It turned out, the cathedral they were referring to really was wigwam shaped. My camera was buried in my bag at the time, but one of the others got a couple pictures.
The Hostel was okay, slightly smaller that a freshman dorm with its own bathroom and 4 beds in two bunks, so we had 2 rooms for all 8 of us. We were pretty hungry at this point and headed down the street, opposite of the direction we came, to see if we could find a place that was still open to get some food. We found this place that was pretty much a Döner Kebab, where we got some chicken fingers, burgers, and whatever the typical Döner Kebab meat thing is. When we went back outside, we realized that we were here earlier, and that this was in fact relatively close to the train station compared to all that winding around we did. Oh well, at least interacting with the people was entertaining.
We watched TV for a little bit as we finished our food, but after that pretty much took showers and crashed since it was kind of late. Just like London, there was free breakfast in the morning of cereal, milk, toast, and juice.
The next morning, we got a couple cabs (There are 8 of us) and headed to the Liverpool football (soccer) stadium. Apparently, there are two stadiums in the area, one blue (the opposing team, Everton) and one red (the local team, Liverpool). Dennis, Ben, and kind of Vlad were all Liverpool fans, but the rest of us didn’t particularly have a preference. The driver of the cab I was in was a Liverpool fan, and thus by the rules of rivalry, had to down Everton. As we were heading up a hill at one point, he pointed off into the distance and said, “And if you look over that way, you can see that blue s***hole [Everton Stadium], though I don’t know why you’d want to.” Later, he made another comment to the effect of “Better dead than blue.”
When we finally got there, we grabbed some hotdogs at a little cafe and listened to their American music, since everywhere has American music, before the tour was supposed to start. Only Ben, Dennis, and Conrad actually went on the tour since it was like €12. The rest of us just chilled in the cafe till they were done, except for Vlad who went to get shave old school barbershop style. Unfortunately, the place he found, the main guy was out for lunch. Since we didn’t have enough time for him to really wait, he got a shave anyway with an electric. Once they finished, we visited the gift shop where Vlad and Ben got shirts. After that, we called the Beatles Fab Four Taxi Tour cabs which came and got us. First off, I recommend the tour to anyone that makes it to Liverpool. It was definitely worth it. Better than any of the bus tours they offer.
On the Beatles Tour, we visited pretty much all of the historical Beatles sites in Liverpool. Penny Lane, Strawberry Fields, various houses that the members lived in, and even the church where some of the founding members met. The cab drivers were really nice, and knew a lot, which made it much more enjoyable. One of them was an Everton fan, though, and ragged constantly on Vlad (who was the only one wearing his recently purchased Liverpool shirt). Our cab driver, probably to make it more even, often ragged on the other driver for being an Evertonian. Anyway, the tour was a bit long, but I found the whole thing to be enjoyable. We got out at every stop to give time for pictures and detailed explanations of the Beatles story. I only found out after the fact that a couple of the people on the trip really didn’t care about the Beatles at all, but I won’t list their names for their protection. Overall, though, I think everyone had a great time, and it lives up to all the hype.
The drivers dropped us off at the last attraction which was where, if I recall correctly, John Lennon and Yoko Ono were married. They probably would’ve driven us back, but Hatter’s was only a few doors down, so it wasn’t any trouble just to walk. Once back, I purchased the three hours of internet card which Vlad split with me. I was going to let him use 15 minutes of it for free, and I told him to sign out when he was done. I took a short nap, and when I awoke an hour later, he was still using it. After he finished, he’d used like an hour 15, so we just split the cost of the card at that point.
By this point, we were hungry again, so we got something to eat at a little shop. After that, we headed to a club/bar thing called Bumper. It was pretty close by, only a couple blocks over, and had a really nice atmosphere. Mostly young people in the 20 to 25 range, and it had the feel of the kind of place people went to hang out and dance, and not so much to pick up random strangers. The kind of place you could get to know all the regulars if you came frequently enough. Everyone got a drink (soda for minors), and we chilled out on a couch and had a good time. The music selection got more interesting as the DJ became more intoxicated (hopefully all the empty bottles on the table weren’t his, as he probably could’ve inebriated a small elephant with that amount).
The next morning, we got up really early to catch our flight. We called another set of cabs and checked out. We piled in, and the cabs took off. Now, I can’t say how the other groups cab went, they pulled off slightly before us, and we didn’t see them again till we got to the airport. Ours went phenomenally. Instead of pulling out behind the other cab, he did a U-turn and headed in the other direction. I was a little concerned at first, but after a bit, we just went with it.
I’m not sure if I’ve mentioned the zig-zig lines in another post, or in just a picture, but England has these lines on the road in some places:
They mean that you aren’t supposed to pass other cars, here. Essentially everywhere else, you are allowed to pass. Well, our driver passed in those sections, looked both ways and ran a couple lights, and sped us to that airport faster than was legal, I’m certain. Going only like 10-15 miles, and having left slightly behind them, we shouldn’t have beat the other taxi by 5 minutes, but we did, and it was awesome.
After that, we went and got on our flight to Dublin. The only complication we had was that the one bag we were checking was overweight, so Anya removed some things from it. Vlad later had trouble getting through security with Ben’s shaving gel because of that, but it didn’t affect us making it on the flight, and Ben will have to buy more gel.
Getting settled in in Dublin, and I’ll update again when I can.
London 3
On our last day in London today, we went back out to Westminster and saw the Westminster Abby. It was really nice from the outside, but because we had limited time and it was a bit more costly than I expected, we didn’t go in.
We went to a local restaurant just down the street from the abby. The other guys had more generic stuff, but I got the shepherd’s pie, and it was pretty awesome. I guess I should’ve taken a picture of how awesome it was, but I ate it too quickly and we were trying to beat the train strike.
I’m going to come back to the strike, but before we headed to our final stop, we visited the train station where part of the Harry Potter movies was filmed. They have a little thing set up for Platform 9 3/4, and Jason, Ben, Conrad, and I took some pictures looking pretty dumb.
So, on to the strike at the Metro. This story is pretty crazy, in my opinion. The workers of the London metro are pretty much all union members. They decided they weren’t getting enough pay, holidays, etc., so they informed the city that they would be striking today (June 9, 2009). The city and the union started having talks beginning, if I recall correctly, last week. Until yesterday, everything was going fine, and London was meeting pretty much all of their demands for increased pay and all that. What happened yesterday is that the union demanded that two fired employees be reinstated. Not such an unusual union request, you might think, but you’d reconsider if you heard why they were fired.
The first guy the union wanted to reinstate was fired for opening the doors on the wrong side of the train, as well as lying about having performed safety checks on the train. The second guy was fired for suspected theft from the Metro, and he will be on trial for said theft at some point this month. So, London, of course, couldn’t agree to that, so they didn’t. Thus, tonight at 7PM, they struck (or is it striked for this type of strike?). There were all kinds of advisory warnings to be off the metro by 7, so we made it to our last metro stop by 6:30. By that point, the trains had already been getting a bit packed. Our train to Liverpool wasn’t scheduled to be there until 8, so chilling out in the lounge was in order until it our train go to the platform.
Another story in the paper that I found amusing was one about the Obama family sans President Barack. Apparently Michelle and the kids visited London some time recently. The British paper that I was reading had a nearly half page article abot the Obama ladies eating a local pub. The paper, hiliariously, took an offended tone that the First Family ate at a local pub rather than at some high class restaurant. It even went as far as to make drinking puns such as “Mich-ale” and “O-bar-ma”.
London 2
We spent most of the day today in the Natural History, and we managed to still not see the whole thing. It’s really, really awesome and has a ton of exhibits. I can’t even imagine how many square feet the place must be. I took a ton of pictures, so check them out when I get them uploaded. I got a couple gifts for people that hopefully I’ll be able to mail back. If I can’t, then I’ll just deliver them when I get home.
After we got back, we eventually settled on Indian food at a restaurant called Raj of India. I had a spicy chicken dish, and we split some pita bread and different curries.
London
We landed in London in the afternoon yesterday and made our way to St. Christopher’s Inn in Hammersmith. We mostly just walked around to both the east and west. There was a nice park, and London seems pretty cool, overall. For dinner, we ate a Thai restaurant and watched a London soccer game. Vlad wanted to hang around for the Bulgaria vs. Ireland game, but that would’ve been a few hours, so we went on instead.
Also, yesterday, Vlad convinced us to head out to a region known as SoHo where there was apparently supposed to be good bars to hang out in. We were looking for a club named 24:London, which, as I’ve been told, uses Microsoft Surface like technology to create a very high-tech and engaging experience. Needless to say, the nerd in me was more interested in the surface than the drinks, but whatever, I was along for the ride. We ended up getting to the right metro stop, but then apparently those who were guiding us there, which will remain nameless *glare*, did not write down enough directions to actually get us to this club. So, we ask a few people, and they either don’t know or are either secretly hype men for other clubs and advertise those instead. There’s a lot of these hype men, as I’m calling them. They ask you if you’re interested in going to a bar or whatever, and point you in the direction of the one that pays them. They mostly wear black trenchcoats and black bowler hats, for some reason. We end up wandering around in a circle like three times before finally heading in a new direction, which was them deemed too gay, then not too gay, before we ended up heading that way. By this point, people in the group are getting annoyed with this walk and each other, so we just end up in some random cheap club. A few people had some drinks, checked out the mediocre dance floor, waited for Vlad to finish his drink (which becomes a common occurrence on the trip) and headed out.
Walking in what we think is the right direction for 24, we run into another hype man who tells us that Paul Oakenfold is playing at some bar (that I bet he worked for). I don’t know the name, but Ben and Jason do. He is, according to them, one of the more famous DJs that tours, and is supposed to be worth seeing. My comment to the whole scenario was that we’d just gotten a pop-up advertisement, and for some reason a groupmate clicked it. I think my assessment turned out to be the most true as you’ll soon see. A few people paid to go in when we got there, but Ben stopped and asked the bouncers who was playing. They didn’t mention Oakenfold’s name, so Ben inquired further. We realized that no, he wasn’t there, and wasn’t allegedly going to be there for a week. We were assured the current DJ was good, too, but people that paid go their money back and we all left instead. With that behind us, we followed the hypeman back to the bus stop. He told us that he didn’t know that Oakenfold wouldn’t be there for another week, but I didn’t buy it. We got on the bus and headed back.
This morning, we got up and went to Big Ben and the London Eye. Big Ben was really cool looking, and I took a few good photos of it. Vlad, Anya, Dennis, and Tim all went up on the London Eye (like a Ferris Wheel with small glass rooms instead of buckets and seats) for £16. The others of us, Jason, Ben, Conrad, and I, went and watched the street performers. I took a few videos of them, and compiled the first half into this YouTube video. Some of these guys are pretty good, and I’ll have pictures uploaded when I can. If you see any of the pictures and can identify the acts, feel free to comment here with that. I was also interested to find that there were a number of horror genre events in London. We saw a place called Fright Club and another called The London Dungeon, though we didn’t have the time or inclination to actually visit.
I had to talk to Wachovia for a third time (First time was before we left for Spain. Second time was in Spain.) today. I was a little frustrated and disappointed that my card had been locked again, even though they now knew for certain I was in Europe. I found over the phone that what happened was one of the things I purchased was through a company apparently based in Texas of all things, and thus Wachovia put a hold on my card when I made another purchase back in Europe. I got it all straightened out by calling them again. I used Yahoo! Voice, which is an awesome service, to make my call.
I’ll now spend a minute pushing Yahoo! Voice because it was really great. Essentially, you need speakers, a microphone, and a cable/dsl level connection and you can call anywhere in the world for a great rate. The service is Pay-As-You-Go, and prices range from 1¢ a minute to call the United States to 27¢ a minute to call Moroccan mobile phones. It doesn’t matter where you’re calling from. Also, United States 1-800 number calls are entirely free. You don’t even have to put money in your account to make those free calls. The program is a free download for at least Windows and Mac (didn’t check on linux). Anyway, my kudos to that service.
We rode the metro system around a lot since we arrived, and it’s a pretty nice system. The locals seem to mostly refer to the below ground train system as the Tube or the Underground. The passes we needed were £5.60, which is about $9.25, so a little pricey, but they lasted all day, and we made sure to get our money’s worth out of them. Like Barcelona, the London metro system beats Atlanta’s with its eyes closed. Atlanta definitely needs to take some cues from the successful metro systems in the US as well as abroad. I think London’s system is overall more comprehensive and reaches more parts of the city more easily than Barça’s, but more of Barcelona’s trains and technology are newer. The London tubes feel like they’ve been around forever, and Wikipedia agrees with me, dating the system to the 19th century.
I guess that’s a good segue into how old things are in London. Unlike Barcelona which has older parts, London just generally feels older all over. It’s got an interesting aesthetic about it that I’d probably like to explore more than I have time for. I have a feeling that many of the great and old cities of Europe share this kind of quality, and hopefully, I’ll make it to some of them as well.
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 Third Week
I had a pretty good week this week. I’ve been mostly walking back from school to get some exercise in (it’s right at 4.0 miles) as well as to save trips on the metro. We also planned our trip to the UK. I’ll probably try to cover things in this post mostly in the same order as I have in the past couple of posts with classes first followed by things I visited and things I plan to go to still.
My classes were good this week, but I have to say that I didn’t quite enjoy them as much as last week. In Algorithms, Merrick covered mostly modular arithmetic and finished up some thoughts from last week. Although we covered modular arithmetic a lot in CS 1050, he found a lot of new material to present, in my opinion. The gist of modular arithmetic, to explain it briefly, is that sometimes you can take a long (often infinite) set of numbers and have them fit on a much shorter scale with repetition. So, for example if we wanted to do all the integers from 0 to 15 in mod 4 it would look like this:
Normal: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 Mod 4 : 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3
So, if you thought of time as a number line of all the hours since the start of time, that would be impractical. It’s a quarter to 1.22721379 × 1014 O’clock (About 100 trillion hours) just doesn’t compute. Instead, we work mod 12 such that hours go 1 through 12 repeatedly (or 0 to 23 in mod 24) because this makes more sense for us.
Note: Mod is similar to the remainder after division, but is distinctly not the same. If you divide 37 by 5, there’s a remainder of 2, and that is the same as 37 mod 5, but when you take negative numbers, it doesn’t work the same. -37 mod 5 is 3.
Anyway, there are some neat tricks that come about from this kind of math. An example would be (we did this one for homework) is the number 41536 – 94824 evenly divisible by 35? At first, that definitely seems like a daunting task, but if we work in mod 35, it’s easier. Assuming mod 35, we want 41536 – 94824 to be zero because if it is evenly divisible, then there won’t be a remainder after division (and anything that comes out to 0 after the mod is the same for positive and negatives). So, I’m going to hide the solution in a box both because it is long and mathy in case you don’t want to read it and to give anyone time to think if you want to try to see for yourself if it is evenly divisible.
The approach we took in class was first see if the number is divisible by 5, then see if it is divisible by 7. If it is divisible by both, then it is divisible by 35, otherwise it’s not. So, start by checking the first number for divisibility by 5.
4^1536 = (4^2)^768 We can take 4^2 and do mod 5 to get 1. So, (4^2)^768 = 1 ^ 768 mod 5, and 1 raised to any power is 1. 1 mod 5 is still one. 9^4824 is the same as 4^4824 when you apply mod 5, and we can do the same thing as before to get 1^2412 which is just 1 again. So, mod 5, 41536 – 94824 is 0. Meaning it’s divisible by 5.
For 7, it’s similar, but different. It should be obvious that 41536 – 94824 is the same as (4^6)^256 – (2^6)^804. Now, using Fermat’s Little Theorem, we know that any number raised to the p-1 power then modded by p, which is prime is equal to 1. So, 4^6 mod 7 and 2^6 mod 7 are both 1. 1 – 1 = 0, and thus it’s divisible by 7. Divisible by 7 and 5 means divisible by 35.
Anyway, enough math for now. Kevin, Joe, and I went to Mount Tibidabo the other night to take some evening shots of the city. Unfortunately, when we left, it looked like my camera was fully charged, but when we got there, it seems I misread it, so I wasn’t able to take many pictures. Kevin, however, was able to, so I think I’m going to ask him for those this week.
I’ve been eating in a lot more this week. Both Thomases (How do you pluralize Thomas?) and I have been walking the 4 miles back from school each afternoon in order to save trips on the metro. When we get back, we’ve spent a couple euro on bread to get baguettes, and then chorizo meat and edam or gouda if we’re out of meat or cheese. For dinners, I’ve found that vegetables and pasta are pretty cheap to buy daily, and I’ve been getting a kilogram of meat or so that lasts a bit. I haven’t found any ground beef, which I find surprising. All I’ve found is ground beef pork mix, which tastes pretty much the same, in my opinion. Overall, I’ve found eating in to be a mostly nice option. The biggest flaw is that I lack some basic cooking equipment that makes it a little more difficult. For example, an oven and measuring cups.
So, I found one and was shown another ice cream shop here recently. The first is over by the Picasso museum, which I need to visit. The flavors I’ve tried there were chocolate (which was amazing), Rochet (Which tasted just like the candies), and Café (which actually tasted a little like rum). They were by far better than most ice cream I’ve gotten in the US, especially the chocolate. A few days later, Anya showed me this place in Plaça del Rei where she said her family thought had some of the best ice cream (and by ice cream, I mean gelato). I had their chocolate, which was also amazing, and another flavor that I can’t recall, so I guess I’ll be foreced to go back there to find out.
The city also goes crazy over soccer, or fútbol. The Barcelona team won, I believe, the European cup. Bacelona rioted after the game that night and apparently did 100.000€ (Where we use commas in numbers, they use decimals, and where we use decimals, they use commas. Go figure.) in damages. I started to go out to take pictures of the mayhem, but I was hearing explosions so loud that they hurt my hears with the window closed, I decided to stay in instead. It was certainly interesting to see from the room, but too dark and distant to get any real pictures.
Lastly, a few of us are planning to go to the UK. We bought tickets and we’re going to visit London, Liverpool, and Dublin. I’ll post details later in the week.
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.























