build page 4 - Dave's Blog

Search
My timeline on Mastodon

DNA seen through the eyes of a coder

2008 Jan 3, 12:01The title says it. This is a description of the build process, make files, and programming language syntax that is life.PermalinkCommentsgeek humor genetics biology dna programming science evolution software unix

Web's Builders See Too Much Fuss Over Standards, Not Enough Innovation

2007 Dec 21, 11:46My saving of this article does not necessarily reflect anything on my team or company.PermalinkCommentsarticle internet standards web

Microsoft Research Singularity Project

2007 Oct 8, 3:55FTA: "Singularity is a research project focused on the construction of dependable systems through innovation in the areas of systems, languages, and tools. We are building a research operating system prototype (called Singularity)PermalinkCommentsmicrosoft os singularity windows research microkernel

Easy Come Easy Go

2007 Sep 14, 7:37I previously mentioned how much I enjoyed my new office. Well my team has moved to a new building and although we get more offices total meaning no one on the team has to share an office, this building has less windowed surface area which means less people get window offices. Since I received the window office recently I'm kicked out now in FIFO order. Stacks are so sad.PermalinkCommentsmicrosoft work personal office nontechnical

Welcome to Subsystem for UNIX-based Applications

2007 Aug 10, 9:25A POSIX subsystem to build UNIX applications on top of on Windows.PermalinkCommentsunix microsoft posix programming c windows via:swannman

Wp64 Issues

2007 Aug 6, 3:43Miladin told me about the Visual Studio compiler's promising option Wp64 that finds 64bit portability issues when compiling in 32bit. If, for instance, you cast from a (long*) to a (long) you get a W4 warning. However, the #defines are still set for 32bit builds. This means that other parts of the code can make assumptions based on the #defines that are valid on 32bit but generate 64bit errors or warnings.

For instance, in winuser.h the public published Windows header file there's the following:
...
#ifdef _WIN64
...
WINUSERAPI
LONG_PTR
WINAPI
SetWindowLongPtrA(
    __in HWND hWnd,
    __in int nIndex,
    __in LONG_PTR dwNewLong);
...
#else  /* _WIN64 */
...
#define SetWindowLongPtrA   SetWindowLongA
...
#endif /* _WIN64 */
...
In 64bit everything's normal but in 32bit SetWindowLongPtrA is #defined to SetWindowLongA which takes a LONG rather than a LONG_PTR. So take the following code snippet:
...
LONG_PTR inputValue = 0;
LONG_PTR error = SetWindowLongPtrA(hWnd, nIndex, inputValue);
...
This looks fine but generates warnings with the Wp64 flag.

In 64 bit, p is cast to (LONG_PTR) and that's great because we're actually calling SetWindowLongPtrA which takes a LONG_PTR. In 32 bit, p is cast to (LONG_PTR) which is then implicitly cast to (LONG) because we're actually calling SetWindowLongA. LONG and LONG_PTR are the same size in 32bit which is fine but if you turn on the Wp64 flag there's a W4 warning because of the implicit cast from a larger size to a smaller size if you were to compile for 64bit. So even though doing a 32bit or 64bit compile would have worked just fine, if you turn on the Wp64 flag for 32bit you'd get an error here.

It looks like I'm the most recent in a list of people to notice this issue. Well I investigated this so... I'm blogging about it too!PermalinkCommentswp64 technical 64bit compiler c++ visual-studio setwindowlongptra

Windows Live Maps Help - Build Your Own URL

2007 Jul 25, 7:15Documentation on the URI format that maps.live.com uses. Makes it easy to dynamically construct a URI that maps a specific location.PermalinkCommentsmap live windows microsoft uri url help howto

Persuasive Games - We design, build, and distribute electronic games for persuasion, instruction, and activism.

2007 Jul 18, 8:51Games that influence your opinion. They're Op-Ed games.PermalinkCommentsflash game games politics

Instructables EMP shopping cart locker

2007 Jul 2, 9:04Build a device to remotely lock shopping carts.PermalinkCommentsarticle humor electronics shopping-cart wireless diy via:swannman

YouTube - Flying Spaghetti Monster spotted in Germany

2007 Mar 30, 11:39This is a video of the Flying Spaghetti Monster spotted behind a building in Germany.PermalinkCommentsreligion video humor fsm flying-spaghetti-monster

The "Works on My Machine" Certification Program (Coding Horror)

2007 Mar 21, 11:32A badge I think I can apply to many of my personal projects. Note to self: remember this later when someone breaks the build.PermalinkCommentsbadge certificate humor programming development software

Graffiti Research Lab - L.A.S.E.R. Tag

2007 Mar 15, 1:08Graffiti project using laser tagging to project a giant car mounted laser onto a building. Very cool video.PermalinkCommentsart cool graffiti movie video technology weapons laser projection cultural-disobediance

RDFa Primer 1.0

2006 Nov 28, 5:11RDFa is a syntax for expressing such metadata in XHTML. The rendered, hypertext data of XHTML is reused by the RDFa markup, so that publishers don't repeat themselves. The underlying abstract metadata representation is RDF, which lets publishers build thePermalinkCommentshtml metadata semanticweb rdf specification w3c xml xhtml rdfa reference

Side Channel Cryptanalysis of Product Ciphers

2006 Nov 27, 3:07ABSTRACT: Building on the work of Kocher, we introduce the notion of side-channel cryptanalysis: cryptanalysis using implementation data. We discuss the notion of side-channel attacks and the vulnerabilities they introduce, demonstrate side-channel attackPermalinkCommentscryptography essay reference bruce-schneier

Commercial Exploitation of Europe's Public Sector Information

2006 Nov 27, 2:15Public bodies are by far the largest producers of information in Europe. This information is recognised as a major, but so far under-exploited asset, which could and should be a fundamental building block of the ‘new economy’ in the Information SociPermalinkCommentsstudy economics europe public-domain information government read

Map of main Microsoft Campus including proposed new buildings and parking

2006 Mar 10, 6:45PermalinkCommentsmicrosoft microsoft-campus king-county map parking

New Shoes

2004 May 10, 10:37Looking around the Microsoft campus it was easy to tell people who were there for an interview from the programmers who worked there. All of the people who were dressed formally, a suit or tie was an obvious sign, were there for an interview. I spent my time between interviews talking to other over dressed people between interviews. The usual topics of conversation included name, city of origin, computer science background, and the crazy problems our interviewers had asked us. Going through these topics with one such person, who incidentally was the only woman I saw interviewing, I asked what school she was attending. She told me she was just finishing her Masters in Computer Science at [some college] and I told her where I was from. She then asked me, "You have your Doctorate in Computer Science?" "No," I said, "My Bachelors... I'm working on my Bachelors." "Oh," she said, "Well you look very mature." I'm fairly certain that's a first for me -- being told I look "very mature" that is. Unfortunately, at that point my tram showed up and I had to travel to a different building. Now I'm left wondering what made me look mature. It could have been the gel or the slacks or the tucked in shirt. The day previous while dressed casually, hanging out with my friend Jeannie, some of her friends thought I was her age, about eight years older. The common element between my two appearances were my new black dressy-ish shoes. Maybe its just that easy.PermalinkComments

Plane Wackiness

2004 Apr 22, 6:44My interview was scheduled for Monday starting at 8am, so when I signed up for the trip and MS suggested a departure time of 4:30pm on Monday I thought that'd be good. Unfortunately the entire process ended at 4:15pm and it takes a little more than 15 minutes to get from Redmond to Seattle and then through the whole airport deal. So after the taxi ride to the airport and waiting in line for like 20 minutes its 5:30pm and I'm at the front of the line asking this woman for a new ticket.

Woman: *typing* Well I can get you to LA... Me: Yeah well that's the right state. Woman: *still typing* Oh... Hmm... Uhoh... *other non-words* Me: *waiting patiently* ... Woman: Are you ready to run? Here's your ticket. Gate C11.

I look at the ticket and the plane's boarding at, what do you know?, 5:30pm. So yeah I start running. I hit the security check point line and I know all about this. I take off my belt and shoes and empty my pockets into my backpack, my only luggage. I am Mr. Prepared, or maybe Prepared-ness is my middle name, whatever. I get through the line with no problem, put on my backpack and holding my shoes and belt in one hand I notice a big old clock just to my left. While I'm staring at it, it changes from 5:42 to 5:43. "Oh shit!" I think, so I start running again. I finally get to the appropriate gate and get on the plane all out of breath. I'm walking down the aisle with shoes and belt in hand, and I guess I look a bit out of sorts. I sit in my seat and I'm telling the guy next to me about my whole deal: "Ha. Yeah. I was late and with the running and the security checkpoint..." into incoherent mumbling and gesturing. So it turns out the pilot and copilot's incoming flight was way late and I ended up sitting in my seat for another 15 minutes before we could take off. All that wasted running. What a shame. Coming into LA we've been "landing" for like 20 minutes. We finally get on the ground and its 30 minutes passed the boarding time of my connecting flight. I start thinking about anyone I know who lives in LA. All the other passengers stand up and block the aisle. Then, an announcement "Will Daniel Riesney please come to the front of the plane." OK I can tell that's supposed to be my name, but how the hell am I supposed to get to the front of the plane? The people near me who have heard me talking to the guy next to me about this let me past easily enough. But now I have to explain this to each person out of ear shot to further my progress. "Hi. Excuse me. They called me to the front of the plane. Pardon me. Can I get by." And so on. Its getting more hostile the closer I get to first class. Up to this one guy. He's trying to talk on his cell phone but its not working because everybody is trying to talk on their cell phone now that we've landed. His phone connection has failed. I can't guess at what else has happened to him today but he's decided to make his Custerian last stand here between me and the rest of the plane.

Me: *continuing from previous passengers* Excuse me. Pardon me. Guy: *spinning around* WHAT!? Me: Can I please get by? Guy: What? Why? Were not going anywhere! This whole time I've been forcing my way past him. Guy: There OK your past me now! Your several feet ahead of me! Congratulations! Me: Dude, I'm sorry they called me to the front of the plane. Guy: I find that highly unlikely!

Whatever. I keep walking and like 7 people past the asshole I guess the flight attendants give up on me and start letting people off the plane. Now who feels like an asshole? Its me. I get off the plane and some airport guy has a new schedule for me. Oh good I'm thinking, I've got an hour until the next flight's boarding time at 10:30pm. So I get on a tram to travel to the other side of LAX. I wait for oncoming traffic to stop so I can climb up a stopped escalator (Incidentally right next to it is another escalator which has been closed off. Why would they do that? Escalators cannot break they just become stairs.) I get up there and wait in line for an extreeeeme amount of time and finally get up to claim my ticket. Its 10:20. I get my ticket and, yeah, the departure time is 10:30, the boarding time is 10:10. So I start running again. More security check fun. I finally find my boarding gate. I rush up...

Me: *breathing heavy* Here's my ticket Lady: Oh good your finally here. Just go right out that door, *points* down the stairs, *more pointing* and wait for the tram.

WHAT? Isn't there supposed to be a PLANE somewhere? This is what I'm thinking not what I'm saying. So I walk outside and down these steps. And I'm waiting. The lady from inside joins me.

*awkward silence* Lady: The bus should be here pretty soon. Me: So... I'm going to miss my plane huh? Lady: Oh no, see here? *points at my ticket* Your ticket is confirmed so they can't leave without you. Me: Oh good... I hope they didn't tell the other passengers that.

Lets see how many passengers I can piss off in one night. Eventually this bus shows up. I get in and the guy starts driving. "Do you know where I'm going?" I ask. "Yeah" the guy says. Great. Fine. Whatever. I don't care anymore. So we drive back around to the OTHER SIDE of the airport. You know, the side I started on. Yeah that side. So I get off the bus and walk into the small building set aside for smaller airlines. I see the frantic looking ladies manning another of these gates. They see me, check my ID and ticket, and one of them ushers me out the door next to the gate. Out the door and into a small gated area outside. So me and this new lady are just standing here. Even had I the energy to ask her what was going on its very loud what with all the planes. So we just stand here at this gate facing the planes for a while. I look at her trying to make eye contact and get some sort of acknowledgment that we are in fact waiting for SOMETHING. Eventually one of the day-glow guys appears from between some planes and saunters up. The lady hands him a paper and walks away. At the time I was kind of offended but looking back on it, maybe the lady was a deaf mute and I'm the one being insensitive. So now I follow this guy through a bunch of planes. I'm yelling "San Luis Obispo?" trying to be heard over all the ambient noise and this guy is somehow responding to me with an even tone no yelling required. I don't know how he did that. We finally get to the plane and its 10:40. So I delayed the flight ten minutes. I'm thinking its going to be really awkward when I sit down and we immediately leave. Its going to be suspicious even. But, not to worry, we wait while the flight attendant argues with the guy who brought me to the plane for another ten minutes about how many people are supposed to be on the plane. Whatever.PermalinkComments
Older EntriesNewer Entries Creative Commons License Some rights reserved.