03 Mar 2010 @ 7:08 PM 

for the last little while, people with fewer brain cells then a Pygmy chimpanzee’s middle finger have been going on and on about how the “world will end in 2012″. Well, I have a little story for you all-

It’s set in the year 2098.

Archeologist (or, as they will be called then, digger men) will be using their dirt shovers (what we now call a shovel) and come upon a beige box.

Experts will be baffled! They released the following information on what they believe the object to be and what it was for.

Professor Jeffson has a theory- he believes that the object was used for storing, and retrieving personal data. the logo “IBM” was an insignia of a long dead religion that dedicated themselves to getting down to business with machines.

Professor Ytterby, on the other hand, has a different theory- he concludes that the device was used for predicting the lunar cycles of the moon, and by using the alphabetic input device, it could predict when people would die. Later, and to the amazement and grief of a large crowd, he powered on the machine and entered the following data at the prompt:

Current Date is Tue 01-01-80
Enter New Date: (mm-dd-yy):01-01-2100

What he didn’t realize was that what he would reveal with one keystroke was more then any man should ever know.


Current Date is Tue 01-01-80
Enter New Date: (mm-dd-yy):01-01-2100

Invalid Date
Enter New Date: (mm-dd-yy):

Invalid date?

The professor came to the only logical conclusion- the universe was going to end on the year 2100. The ancient Americans knew of this day, using their advanced vision boxes called “televisions” they were able to see into other people lives, and steal their thoughts. It was also believed that they referred to spoons as “face trowels” and would often purposely do something and loudly exclaim “did I DO THAT?” in a nasally whine that would make Cyndi Lauper blush.

This news spread like wildfire (literally, in fact, as the entire backbone of the internet was based on the spread of wildfires) Threads such as the following:


Posted by NikolaBreastla(Newbie with 13 posts) at 3:04PM On Wednesday, November 26th 2098


No Way
I Don’t Believe It


NikolaBreastla: the famous Russian scientists we’d all know had he run a brothel


Posted by BoObRaT(Member with 140 posts) at 4:50PM in Wednesday, November 26th, 2098


I HAVE PROOF!

THEY ALSO FOUND A WATCH AT A MORMON BURIAL GROUND, IT WAS STOPPED ON 7/28/1973 AT EXACTLY 11:03:55 PM! YOU DUMS KNOW WHAT THIS MEANS?


“If you get to second base and tell, your a boobrat” – Frank Sinatra IV


Posted by BC_Programming II(member with 400 posts) at 8:04PM On Wednesday, November 26th 2098


Quote From:BoObRaT on at 4:50PM in Wednesday, November 26th, 2098
THEY ALSO FOUND A WATCH AT A MORMON BURIAL GROUND, IT WAS STOPPED ON 7/28/1973 AT EXACTLY 11:03:55 PM! YOU DUMS KNOW WHAT THIS MEANS?

First: release caps lock. I’m sick of telling you over and over and over again to type normally. It doesn’t make you look smarter. Remember that thread where you argued that the shape was easier to read and I shot you down with 5 case studies by reputable organizations? yeah, that was sort of a hint that you don’t know what your talking about.

Any way- I think that could mean:

That they had really bad watches?

There really were no golden plates?

They were grave robbers?

Come on! Tell us.


My Grandfather was lacktoes intolerant. He couldn’t stand people with no toes.


Posted by BoObRaT(Member with 140 posts) at 9:12PM in Wednesday, November 26th, 2098


Sorry about the caps BC, I know, I remember that thread. I still think they’re easier to read though, regardless of what anybody says.

The watch stopped at the exact time equivalent to 01/01/2100 divided by the constant e Couldn’t it be more obvious?


“If you get to second base and tell, your a boobrat” – Frank Sinatra IV


Posted by BC_Programming II(member with 400 posts) at 9:14PM On Wednesday, November 26th 2098


Quote From:BoObRaT at 9:12PM in Wednesday, November 26th, 2098
The watch stopped at the exact time equivalent to 01/01/2100 divided by the constant e Couldn’t it be more obvious?

It could have been more obvious. You could have said that to begin with instead of trying to build up suspense. And you generally use caps to break the suspense, not build up to it. And I don’t care what you think of caps, it’s called “proper grammar” dumbass.

Anyway, the fact that the time stopped at that particular point it pretty circumstantial. That would be like saying that my great great aunt martha had 5 toes and ate meatloaf every Tuesday so she must have been a good square dancer. I’ll have you know she became a good square dancer through dogged training and a strong resolve, not simply by having the standard number of toes and eating meatloaf made from an unspecified animal.


My Grandfather was lacktoes intolerant. He couldn’t stand people with no toes.


Posted by NikolaBreastla(Newbie with 13 posts) at 11:04PM On Wednesday, November 26th 2098


Why the hell is it in all of my posts it’s ended up with that BC guy and the boobrat guy arguing about capital letters?


NikolaBreastla: the famous Russian scientists we’d all know had he run a brothel


Posted by VinylSiding(Moderator with 1305 posts) at 1:04AM On Thursday, November 27th 2098


Quote From:NikolaBreastla on 11:04PM On Wednesday, November 26th 2098
Why the hell is it in all of my posts it’s ended up with that BC guy and the boobrat guy arguing about capital letters?

It’s a corrolary to Godwins law: all threads involving BC and BOobrat will devolve into a pointless flamewar about either use of capitalization or wether a mouse with a large boob is in fact a rat.



If it’s a penny for your thoughts and you put in your two cents, then someone, somewhere, is making a penny.


And trust me- It just goes downhill from there.

Posted By: BC_Programming
Last Edit: 03 Mar 2010 @ 07:08 PM

EmailPermalinkComments (0)
Tags
Categories: Programming
 07 Feb 2010 @ 3:29 AM 

Companies and businesses want to prosper. At the core, being a successful business means that you make a sizable revenue; But, when those start to falter, how do businesses determine the cause? They generally measure something; for a programming firm, this may be lines of code written. For a restaurant, perhaps the time it takes for a customer to be seated, and so forth. And on the surface, it makes sense.

The problem is, it only makes sense,in theory. Why? because both methods are trying to tack a quantitative statement onto something that cannot be measured in this way; additionally, they forget the human factor.

Let’s look at a hypothetical situation; Programmer Joe. Programmer Joe has worked at a Software startup since it’s early days, and enjoys his job. However, one day, the CEO calls them all into the office to discuss declining revenue. Realistically, the revenue is declining because a competitor has just released a product that directly competes with the startup’s flagship software package. However,  management believes that the loose leash they’ve been keeping the programmers on is to blame; so one of the idea men determines that they should implement a management technique known as metrics. In this case- they start with something basic; each programmer’s performance will be judged directly correspondent to the number of lines of code they write.

Programmer Joe continues his work as normal; he notices some of his co-workers checking in code that re-rolls standard library routines, and cuts out excess code like this. One day he’s called into the Project Manager’s office.

“Joe… I don’t know quite how to explain this- maybe you can. Somehow, you’ve managed to accumulate a [i]negative[/i] lines per day metric… any idea how that is possible?”

“Well, I’ve noticed a lot of redundant code being checked in, and trimmed it down. the code still works the same way- it’s just faster; also, I’ve managed to fix half the bugs on the list just by doing that.”

The Project Manager may, in this case, take this particular information to the higher levels. they decide that the metric is flawed- what they need ot measure is lines of code written minus the number of bugs introduced.

A feature request arrives from a client near the end of the day, at 4:30PM. the Project Manager asks if Joe can look over the request and if he can maybe stay late to try to get some of those features implemented. So Joe spends the next three hours creating a prototype for the new feature and once he has the main functionality down he checks the code in and goes home. The next day, Joe continues his work on this new feature. However, he is once again called into the Project Manager’s office.

The Project manager hands Joe a large stack of papers.

“you know what those are, Joe?”

“No…”

“Those are the bug reports filed on code you’ve checked in recently.”

“All the code I’ve been working on recently has been a prototype… I haven’t yet gotten it fully integrated into the rest of the system.”

I think you can see where I was going there. basically, the fact is that havign a measuring metric that measures small fiobles in the entire process is doomed to cause hiccups within that process and even bring business to a standstill. In this case, rather then worry about the number of lines of code written or the number of bugs introduced, it might be better to focus on fixing the bugs and adding features; the number of lines of code in a project does not directly correspond to the quality of that project as a whole, and in some cases can even do so inversely.

In a strange coincidence, a local Coffee shop that Programmer Joe visits on his way to work had noticably changed. When Joe used to go though their drive thru to grab his morning coffee and a box of donuts for his colleagues, the staff were friendly and often asked him how things were going. Recently, however, Joe has felt like a piece of scrap metal on an assembly line. Once he got to the pay window, he would often hear audible grumbles of discontent as he simply reached into his pocket for his wallet. His donuts have often been obviously simply thrown in the box with little care, too. Joe couldn’t understand it, since these were the very same people that would serve him before. Eventually, Joe decided to go elsewhere for his morning coffee.

The previous paragraph is not an entire fabrication; in fact, I work at a location that does just this. They time every single drive thru customer’s time at the window, and it’s treated as the single most important measurement of performance in the entire store. I’d even go so far as to say it seems to be used to reflect directly customer satisfaction. However, this simply is not the case. The franchise, in particular, places a recommended limit of 42 seconds for waiting at the window. a reasonable time frame, depending on the volume of customers. However, at my location it has now been decreed that we shall not take longer then 30 seconds or, from what I hear of others, they will be verbally “abused” about it.

In any case, a little backstory is probably in order. Lately it would appear that revenue has been dwindling; there are far fewer customers then I remember coming in, at all times of the day. Additionally, various seemingly pedantic rules have been places on our release of such seemingly trite things as butters and napkins. It’s fair to assume in this case that they obviously want to bring business back up again- and that is certainly something anybody in that position would try to do.

However, with that said, they are going about it wrong. In the Retail and Customer Service industry- where almost all revenue is coming from consumers who purchase your product by coming to your establishment, the all-time, 100% most important thing for business is customer satisfaction. No exceptions. Interestingly enough, since this has started, I’ve gotten dozens of complaints from Customers who visit regularly about the shoddy way they were treated while going through the drive thru at some other time during the day. This certainly is not the fault of the workers at the time; since, as I said, they are essentially being “forced” to try to reduce times to <30 seconds. But when you get customers, the main source of revenue for the store, complaining about something that is the result of a change to the store policy that was introduced to try to increase revenue it is pretty solid evidence that the technique has failed miserably.

The problem here is not that those in charge know, as well as anybody else, that customer satisfaction is the single most important thing to the stores success, but rather in that they have tried to assign a single metric to measure this particular quality. And they do not correspond. I certainly won’t argue that customers prefer fast service— it certainly is on their list of hopes when they enter a drive-thru to be out as fast as possible— but I think what one needs to realize is that having their orders (literally) thrown into their car for the sake of speed of service doesn’t please the customer. They aren’t going to think, “well, golly, they threw the sandwich right into the passenger seat and refused to carry on a quick little bit of small-talk while I waited, but damn, it took only 30 seconds, so I am going to say I am satisfied”. I’m sorry, but this does not happen. As long as a customer is not waiting an exceedingly long time for their purchase, they tend not to notice it. Think of it this way- there is the old adage where you can either have fast service, good service, or right service, but you can only choose two. I put forth that, for many consumers it also holds true that when one of these is omitted, and the other two are done in a way that exceeds their expectations, they are likely to generally be satisfied. For example, if a customer is greeted with courteous fervor, and perhaps a friendly conversation ensues in addition to their order being made perfect, they are less likely to notice that they had to wait in the line for a few minutes. Now, if they had to wait that same amount of time and they were treated brashly, they are more likely to take offense. In fact, the single most important thing to almost all customers is not the time they wait, or even the fact that their order is made perfectly to their specifications, but rather to be treated as people, and not as some mindless consumer whose particular interests and concerns are of no importance. The sad fact is using this particular measurement metric encourages the workers to do the latter.

The thing is, there are even further flaws in the mechanism. First, the device doesn’t even work half the time, so times come out skewed and sometimes two vehicles get counted in the same interval. Additionally, since the time measured is the entire time the customer is at the window, this is not simply a measure of the efficiency of the workers to get the product to the customer but also a test of how quickly the customer can pay for their product. if a customer needs to dig for change for 10 extra seconds after the employees have successfully finished their entire order and simply await payment, why is this 10-seconds attributed to the detraction of the employees? “Because we have no way of knowing” the people who read the recorded times may say. The issue here is that obviously if there is one fact you don’t know about what the measurement indicates then there are certainly more, and in fact it could even be put forth that the measurement is completely meaningless. a Customer could be at the window for 10 seconds and still not be pleased, be it because of the shoddy service received while being squeezed through in a tiny window of time, or because they got their order mixed up with another, or some other error instigated by the fact that inhuman demands are made of people there. On the converse, a person could wait for a entire minute at the window and still be perfectly pleased with their service, so using the measure of window time as some sort of barometer by which to judge the performance of a business is downright ridiculous, and this only multiplies when one considers that such time-based constraints are not placed on those consumers who decide to enter the establishment for their service.

And while the latter example has certainly acquired far more attention for personal reasons, it certainly is no more or less ludicrous then the software companies implementation; performance metrics have been tried in nearly every industry and in every industry they have failed to provide the hoped for results. The key here is that the measure is not strictly of customer satisfaction or even of revenue; but more directly, of the value of the business.

Value is a perception and must be communicated and measured to be perceived as value. Value measurement is the process by which management decides on operational performance measures that will enable them to secure the the owners return on investment. Value measures must be aligned with the business strategy positioning the business. Measurement includes measuring lead factors and lag factors. Lead factors identify performance measures that will proactively provide an indication of whether objectives will be achieved or not. Lead factors allow management to receive warning sign proactively. Lag factors measure how successful management was in terms of creating value. Financial reports are the ultimate lag measures of success. When a business lead measures indicate that the business is performing well but the business lag factors are showing the contradictory then it is time to review the lead measures.

The value measurement process determines the behaviour of the business and aligns the behaviour of human capital with the value expectations of all stakeholders e.g. owners, management, customers, employees and partners. Value should be measured and reported on from every stakeholder’s perspective. A true balanced scorecard will drive performance improvements for all five stakeholder dimensions. This all applies to ANY business, regardless of industry.

Flipping quickly back to software, an excellent overview of the problems present with Performance metrics as used in that industry can be found here: http://discuss.joelonsoftware.com/default.asp?biz.5.304155.19

Posted By: BC_Programming
Last Edit: 20 Feb 2010 @ 11:51 PM

EmailPermalinkComments (0)
Tags
Categories: Programming, Theory
 04 Feb 2010 @ 8:44 AM 

A few minutes ago I posted a small Visual Basic 6 class module that could be used to register an applications objects in something called the “Running Object Table” Or ROT. Rather then go on a long monologue in that post I’ve decided that this is an excellent topic for a blog entry, with pictures and whatnot. The forum thread I created is here, and provides the source to a useful class module that can be used to expose your objects on the ROT.

In order to fully understand what the ROT is and it’s usefulness, it’s important to have a basic understanding of COM. At the moment COM is really a “legacy” technology, and Microsoft much prefers that people develop .NET assemblies instead. Of course, what MS fails to mention is that it’s unlikely that COM support will be withdrawn from any foreseeable version of windows, simply because it is so deeply rooted and so necessary for applications, including Microsoft’s. In any case, having a solid knowledge of COM is not something that is going to become useless or even irrelevant anytime soon, so it cannot hurt even a non-programmer to understand some of the basic semantics involved.

Originally, COM wasn’t really released with any fanfare; in fact, it was simply the “bed” upon which the more prevalent technology at the time, OLE (Object Linking and Embedding) was based. OLE really is an awesome technology, but the problem is nobody really knows how to use it. Anyway, the main idea was that each application new how to deal with it’s own files; for example, excel knew spreadsheets, wordperfect new word processing, etc, and the idea was that instead of trying to get applications to implement the various different application “powers” in order to become good, they could simply call on another application to do it. For example, if you made a useful chart in Excel 5.0:

Dun click here for a bigger image, yee-haw

Now, of course you could make a chart with the spreadsheet, but let’s say you wanted to embed the spreadsheet into your word document. In pre-OLE versions of word, you could copy-paste a picture of the spreadsheet, but if you ever needed to change it you’d need to go right back to excel, find the file you originally used, make the changes, copy it, paste it, reformat the bloody document again because pasting it has totally screwed up your pagination, etc. Basically it translates to a huge pain in the ol’ keester.

So Microsoft decided, hey, you know what, let’s make it so you can actually place the spreadsheet document itself into the word document, and you can edit the spreadsheet and have it update in the word document automatically. One of the development team leaders for excel at the time said, “that might be a bit difficult” at which point they fired him and hired somebody else. I’m making this up, obviously. the quip was more along the lines of him trying to discuss his previous extra-marital relations with the project managers mother. Or maybe it was their wife, in either case it’s generally not something you bring up around the water-cooler even in faint whispers, let alone in the middle of an important business meeting about important businessy things.

Anyways, Microsoft eventually perfected the technology that they called OLE. (oh yeah, and just so everybody is aware, it’s apparently pronounced “olay”… so don’t try to embarass yourselves. I still personally pronounce it Ohh- Ell- eee, but hey, I’m a rebel. Also pronouncing it “olay” is just begging for jokes about “oil of OLE” or something. It just feels like it was chosen for comedic reasons.)

using OLE, you could link your excel spreadsheet to your southern US based newspaper, by using the very popular “Copy” command from Excel, and then using “paste Special” in word, you could get the following dialog:

As you can see, there are a number of choices here. the relevant one to this discussion is to insert it as a “Excel 5.0 Worksheet”- the default for the two radio buttons on the side is to actually “paste” the item into the document; here I’ve chosen to paste a link. pasting the spreadsheet into the document directly (rather then linking it) still allows you to edit the spreadsheet, but the spreadsheet data itself is saved right in the word document when you save it. Because linking the object instead offers one extra point of failure and because I like living on the edge, I always opt to link the documents even if I have no good reason to.

In any case, the resulting newsletter is this:

beautiful! such magic is the very essence of OLE. In fact, one could even take advantage of OLE in their Visual Basic Applications, starting with Version 2.0, which included, among other useless “professional” controls, the OLE client control.

Mirror, Mirror, on the wall, whose the leetest of them all?

“But I thought this entry was about the ROT” you ask. to which I reply, shut the hell up, will you, I’ll get to that eventually, and the less you try to fictitiously interrupt me the quicker I can try to ease the topic back to the present day and the running object table. Don’t worry, I haven’t forgotten about it.

Anyways; as I was saying, COM was basically what this OLE magic is based on, and was in fact the “plumbing” that made OLE work. OLE was only the visual manifestation of COM; therefore it was the part that was oooh’d and ahhh’d, (although the actual response was more a hum and a haw, since nobody could really figure the bloody thing out). COM just sort of sat in the background. unnoticed, watching OLE take the spotlight. Microsoft created something called “OLE Controls” whereby various User Interface widgets could be created using a number of OLE Interfaces with confusing names and functions, like an IPersistFile that didn’t deal with files, IAnalEntry which stood for “Accesorized Numeric Arithmetic language”… well actually I made that one up, but you get the idea.

Things started looking up with the creation of “ActiveX Controls” which are exactly the same as OLE Controls, but don’t require all the retarded interfaces to be implemented. Pretty much all you needed to implement were a few basic interfaces. With the release of Visual Basic 5.0, this task became even easier; soon enough ActiveX Controls were sprouting up out of basements everywhere with dubious security and hardly little effort or skill. Unfortunately this had the effect of backfiring on Microsoft as they had forgotten that IE3 sorta just allowed ActiveX Controls to do what they pleased; in the long run, Internet Explorer gave ActiveX a very bad name. The technology itself is sound; however, one consumer (Internet Explorer) has an awful track record when it comes to actually being intelligent with what is actually run. First MS decided, “ha! we’ll just make it so they have to sign the control as safe with this little tool” much to their surprise, the people who were doing illegal things already by creating spyware as ActiveX Controls gladly downloaded the tool and signed them, even though the EULA was quite clear that you couldn’t sign malicious files. “dear gawd! these people are MAD! mad I say! have they any idea the legal repercussions of agreeing to a shrink-wrap EULA implicitly in a completely non-legally binding way?” exclaimed… well, somebody at MS, to which the common reply was “look, do you want this pizza or not?”.

In either case, ActiveX got noticed, and while IE was a massive failure when it came to using ActiveX, ActiveX was perfectly safe on the desktop itself; in fact, it’s still quite prevalent. Go ahead and look on your own windows machines- ActiveX Controls are found in “OCX” files. many are even installed by default. Because ActiveX was more a Programming technology then a silly little User Interface gimmick like OLE, programmers liked to pick apart it’s innards like a vulture likes to take it’s pick from the smorgasboard of delightful organs that are present on a freshly killed wildebeest. Programmers learned of the various COM component technologies that powered ActiveX and OLE before it.

It was around this time that COM itself became the “technology of choice” when it came to interoperating with the various components of windows. So much so that COM itself became deeply rooted in the Operating System; with the actual Shell interfaces that allow for such things as IE plugins and Browser helper objects and Shell Extensions being implemented as COM interfaces.

COM itself establishes a binary standard between modules; it essentially lays out how objects are to look in memory, so that other objects can use them. In a strange coincidence this layout was nearly identical to the way the Visual C++ compiler laid out it’s Class instances.

Unlike C++ itself, or java, or .NET, for example, however, COM does not really facilitate for most things that people seem to require in order for something to be “object oriented”. For example- there was no Implementation inheritance. There was interface inheritance, to be sure, but they didn’t add implementation inheritance because they believed that to replace parts of the functionality of a pre-existing class with your own while leaving parts of the original code intact requires a knowledge of what that code does beyond what you can see, and really there is no debating that fact on the level.

Now then, enter OLE automation, which was really just COM with a fancy name. OLE automation basically meant that you could “control” other applications from another application, completely cross-process. For example, nowadays you can write a VBScript that interfaces with Microsoft word to open a document, make changes to it, save it, and close it. This is possible through OLE automation, because the Word Program exposes itself to other applications, who, strangely enough, are not revolted by Word’s nether regions.

Visual Basic has allowed for the creation of ActiveX programs since Version 5; what Word would be equivalent to as a Visual basic project would be an “ActiveX EXE”. there are both ActiveX EXE and ActiveX DLL projects; they act quite similar to one another, in that the various methods of using their objects are the same in either case. the main difference between them is that an ActiveX EXE is, for obvious reasons, a completely separate process, while a ActiveX DLL is contained in the same process and every process that uses it. This means that all data passed back and forth to an ActiveX EXE needs to be marshalled across a process boundary. Very time consuming, but at the same time the EXE can perform operations asynchronously from the application itself, which, in the case of Visual Basic, really only has a single thread.

When a ActiveX Server program is running, the general idea is for it to add itself to something called the “Running Object Table”. This ia global table that stores all the various active COM objects that can be retrieved. For example, Word, Excel, Access, etc, all place their “Application” objects into this table.

Visual Basic ActiveX EXE programs, however, for whatever reason, do not. This despite Visual Basic having a function that can acquire objects from the running object table, the GetObject() Function.

GetObject

The GetObject Function is probably one of the strangest functions with the oddest behaviour and the quirkiest set of rules of all the functions in the Visual Basic Language. The syntax seems simple enough:

GetObject([Pathname],[class])

pathname, we can guess from our encounters with Excel and word with OLE, would probably accept a OLE enabled document. and lo and behold, passing a excel, word, or other OLE server application document returns that document object. the class parameter however requires some explanation regarding it’s background.

All COM objects have at least one thing associated with them; a CLSID, which I guess stands for “ClassID”, but could just as easily stand for “Chickens Like Seeds In Dung”. This CLSID is required when instantiating (creating an instance of) the object. Some objects have another, optional, more human readable representation, known as a “progid” (god knows what it stands for. I’m going to say “People Really Ought to Give It a few Days” or something. This is far easier to read then the CLSID. a ProgID might be “Excel.Application”, whereas it’s CLSID is {00024500-0000-0000-C000-000000000046} (although technically it fits in 8 bytes, this is the conventional “human readable” form of a CLSID.

Now, you can call me dull, dense, made of cheese or fond of yogurt, but I don’t think I’m too far off-base in saying that the progID, While having an utterly ridiculous acronym expansion that I just made up, is a lot easier to read then the CLSID.

In any case; the Class argument to GetObject() is actually a ProgID. So the question is; how does one call this function to get a running instance of the program? If you do:

Set X=GetObject("","Excel.Application")

a new instance of Excel starts in the background and your given it’s application object. However, it turns out the first parameter is optional… you can in fact do this:

set X = GetObject( ,"Excel.Application")

and your given a instance of Excel that is already running, if available. If not, you get an error. You can trap the error and perform either the former empty string version of the function call or use CreateObject() to create a new instance explicitly though, if necessary.

Now, given that GetObject() when used in that scenario acquires the object from the running object table, it becomes evident why it will not work for Visual Basic objects; as previously discussed, the visual basic Runtime never actually anything to the ROT. This means it’s necessary to do so yourself by explicitly adding it to the ROT using the COM API.

Now, although I wrote the class I describe in the forum post 5 years ago, I distinctly remember that from beginning to end only took about 30 minutes. Most of the COM code I have in there was ripped directly out of a module in my BASeEdit XP project I was working with at the time. One tool I found useful while I was working on it was a little Utility that came with Visual Studio 98 called “ROT Viewer”. Since IT doesn’t appear to be available online anywhere, I have taken the liberty of uploading it myself.

Even the non-programmer can get a few minutes of mild amusement out of the program. With Vista and 7, you need to start the program with Administrator rights, otherwise it doesn’t show anything. Try it out; start word, excel, (I wonder if MS works has a COM server…) and any number of other programs, and watch them get added to the table, close out the programs, watch them leave… OH THE EXCITEMENT!

Posted By: BC_Programming
Last Edit: 07 Feb 2010 @ 02:23 AM

EmailPermalinkComments (0)
Tags
Categories: Programming
 26 Jan 2010 @ 3:34 PM 

I bring forth to you all an important cause.

Ever since the inception of programming, we have used things called Variables. they store our data, they help us to keep track of the ever-changing environment that is where our programs stand. But how often do we think of their rights as individuals? We instead try to optimize them away; “we don’t need that variable” or “we could make that a constant”. You self-centered bigots! All a variable asks is maybe a few bytes of memory, and possibly the ability to be thread synchronized, but you are trying to remove these little helpers as if they have no right to exist! consider the following:

public class ExampleApp
{
private int munused;
private int maddthis=56;
public static main(String[] args)
{
System.out.Println("Hello from main");
for(int i=1;i<51;i++)
{
x /= (++x/i++)/(maddthis*--i)
System.out.Println("x="+x);
}

}

}

Any experienced variable killer can see that they can delete munused entirely, and that they can can convert maddthis to a constant. But what they don’t consider is that they are KILLING innocent variables! Programmers these days endeavour to learn programming practices and implement them with unfeeling and unwavering constitution, with absolutely no regard for the font families they destroy or the variables they create; it’s important to relate to your variables. your average programmer sees a temporary or unused variable as wasteful; I see a variable that is going through a scary change, who needs a friend (have you ever considered the Variables feelings when you typecast an int to a double? your just highlighting that variables shortcomings! you’re telling that variable that they are inadequate, that their data type is simply inferior to the one you are casting it to. And you know what that variable loses? It’s value. Now some other new variable is holding it’s value, and it supports floating point operations, and because of it’s type it gets twice as many bytes of storage!). Tell stories to your variables. Tell then the bible story of Variable Jesus who allowed it’s own destructor to be called, just so that all other variables can have everlasting scope. And, remember: NEVER tell your variables what their scope is. If they discover that their destructor will be called right after this quick for loop, they may go mad. “What? I only have 3 iterations left to live! I’ve lost all scope!”. Be sure your variables know their place. “All variables are created equal- it is their initialization that makes them unique”. Function Pointers have a tendency to forget that they are variables; they walk and they talk and they even have similar syntactic requirements as a function, but don’t be fooled! they are really just a variable in a functions clothing. Don’t try to call a null function pointer or the clothing has a habit of chafing.

Object Variables

Object Variables are possibly even worse then Function pointers. they always consider themselves superior to all the primitive types, like ints and doubles. what Object variables don’t realize is that the vtable that makes them who they are is really just a structure; a collection of function pointers. In fact, make sure your object variables know they are really just a collection of function pointers and private data. Also, educate your young object variables. “never show your privates to strangers, even if they give you memory” and never EVER let anybody put something in your back-end!

If you know somebody well enough, you might want to share certain protected variables with them, as a gesture of good faith. But you still should not trust them with your privates. they might still try to shove data in your back end.

Make sure your objects understand that they really are just the sum of their aggregate parts, and that they have their superclass to thank for almost everything. an Object is created, it is given a few pointers, and sent on it’s way.

Your standard pointer variables are pretty unpredictable too; remember that dereferencing, for a pointer variable, is a very traumatic experience. It’s also important to reduce aliasing as much as possible; to avoid indentity crises between multiple variables who meet and see that they both point to the same memory space. It’s important that you initialize pointers, as well. There is nothing more traumatic then a variable discovering it is equal to 0xCCCCCC or 0xDEADBEEF, and that it is really holding a flag. a flag of surrender. Unless the variable is French this won’t feel right for it.

Posted By: BC_Programming
Last Edit: 26 Jan 2010 @ 03:34 PM

EmailPermalinkComments (0)
Tags
Categories: Humour, Programming
 23 Dec 2009 @ 9:24 AM 

The scourge of the internet, really. Personally, I call them script kiddies. Essentially; they use other peoples scripts to “DoS” a website. A number of fine specimens can easily be found on youtube. For example, http://www.youtube.com/watch?v=iVfEoBPV4Nc. What makes this particular example even funnier is that they don’t even understand what is happening, AND they don’t understand why they are so stupid to even try.

Basically, there are two levels of “hacker” now, 99.9% of them are really just script kiddies, who can hardly even understand Batch files, let alone perl. They copy and use scripts (such as the posted youtube video’s kiddie) created by the 0.1%. What makes it all the more interesting is the 0.1% people often are unaware of their code being used this way.

In either case, a DoS attack is so simplistic to the very core that any cheap 20$ router at the local wal-mart can block it; and any sufficiently equipped server can deal with the extra load from a single PC quite easily.

In this particular example, the first web-site mr.kiddie tried was obviously set to reject constant HTTP get requests. I mean- it’s not too hard to mechanically filter out GET requests that come within, say, a second of each other for the same page, and even the most basic server software implements this.

What happened to the second, less developed (apparently) site simply doesn’t have basic safeguards in place, perhaps because they live in a optimistic world where teenagers go out and get jobs instead of sitting on their asses all afternoon trying to take credit for copy-pasting code from other sources in programming languages they only pretend to know in order to take down some site that nobody will miss for the 10 seconds they manage to bring it down, and then they get called to dinner, where their veteran father yells at them for being so god damned lazy and for not mowing the lawn, to which the “experienced hacker” responds, “you’ll be sorry, I’m gonna start the next M$, and you will be begging for dollaz from me pops” and then he get’s grounded.

The “hacker”… or more precisely, the “script kiddie” culture is really quite simple, much like the social structure of one-celled organisms. You have the fat hairy parameciums, and then you have everybody else. their interactions with one another generally involve using made up english words, like “pwned”, and of course replacing as many of the letter s with z’s in a desperate attempt to look cool. Additionally, conversations often just involve them making stuff up.

“Hey, dawg, I just haxxored Oracle, d00d”

“Oh yeah, well I’ve been buyin stuff off ebay for free using my l33t skills”

ad infinitum. Even early on it’s absurd; I mean, my grandmother could hack an Oracle server with two toothpicks and a ceramic bowl, it’s really that easy, Hell, my second cousins guinea pig was able to drop a few tables from one of their badly administered database servers, but that’s not the point.

You know what? I’ve spent a good 5 years trying to shrug this shit off but I’ve grown sick and tired of putting up with arrogant, know it all little shits whose knowledge could be summarized on the head of a pin. I’m SICK of hearing about how “talented” little Billy is, and then looking at the code only to mistakenly believe little billy designed his code to emulate that mysterious sack of mould in the back of my fridge. Why do I hate this so much? Do I need a really good reason to hate it? really? because honestly I think the problem damn near hates itself, in a manner of speaking.

To make things worse, not only is little Billy a arrogant little prick, but his own ego is fed by his own family members, “Oh, little billy is a genius! He found the file menu in Word, He’s gonna be the next bill gates!” No, Uncle Tom, Billy Didn’t find the fucking file menu, your just too retarded to see whats right in front of you. Do I get points for pointing out a lawn chair for you to sit in when your sitting in it? No, I don’t, and I really don’t think billy should be proud of himself for pointing out the obvious, instead he should feel pity for somebody so stupid they cannot understand a basic UI and then evangelize the person who comes to point out the obvious.

The problem with the entire thing is, either they “have it” or they don’t, and the longer they fester, with no real skills, seated on their high pedestal because they mistakenly believe that employers will come to them after they barely graduate from high school, because of that awesome space shooter program they made in Visual Basic 2.0 and released on a shoddy geocities web site. Is the  longer they don’t gain any skills whatsoever, and the higher the chances that they will be struck down, working as a custodian in their local elementary school. Having been forced to realize that they aren’t bloody geniuses, that copy-pasting other peoples code is plagiarism, not “leet skills” and that they really, really, really, have a lot more respect for their old schools custodian.

Another issue- and this applies globally to programmers,software developers and those that want to pretend they are one of those two, is that they mistakenly believe they have reached a “plateau of greatness” or skill; No programmer, no matter how much experience, cannot learn something new; and it’s far too common that you have people, fresh out of college, or high school, or whatever, that think that because they read the programmers guide included with Visual basic 2.0 that they can crank out AJAX applications; this simply is not the case. It’s not a plateau- it’s a group of infinitely rising mesas, and joy of programming comes from climbing those mesas, every once in a while looking back, and realizing just how far you’ve come; just remember to do one thing before you start feeling satisfied; look up, and realize just how far you have to go.

Posted By: BC_Programming
Last Edit: 23 Dec 2009 @ 09:24 AM

EmailPermalinkComments (0)
Tags
 18 Dec 2009 @ 4:43 PM 

Over the years, many different games have been published. many different genres explored. People think games have gotten worse over the years, but really, that is simply not true. Parents are simply paying attention now, whereas before they kind of used the Nintendo as a baby-sitting tool (“dammit kids, go play your tendo, or whatever the flip you call that thing”…. “dad, that’s a VCR…”) now they are actually paying attention to what their kids play, the “violence” and “nudity” they expose them too. I of course put those in quotes because seeing red particles come out of a polygon hardly consists of violence to me. And I mean, really, they might have improved the whole modelling concept, but I’m afraid that my experience has taught me hard lessons that game characters often lack any sort of anatomical correctness. In the case of kirby I imagine this is really for the better, last thing we need is more confusion over what the hell he is. As he… it, whatever stands now, he’s a giant pink testicle that happens to be able to swallow and eat other enemies and absorb their powers. Sorry, did I say testicle? yeah, I meant balloon. Anyway, imagine him anatomically correct. little pink weiner flappin around as he flies through the air. he does littles spins with his hammer weapon and his little winky slaps the enemy in the face, you know, all good fun.

Anyway, as I was saying, the worst offender for me has been The Zelda Series, breaking RULE after RULE. I mean, not even ten seconds into the game, and your encountered with this screen:

its dangerous to go alone

There are FAR too many rules being broken here. I mean, first, you don’t just barge into some old guys cave. you knock, I mean, for gods’ sake, what if he was naked or something. Secondly, you NEVER accept wood from some old guy. It never turns out well. And Lastly, WTF are the flames here? are we encouraging children to light balls of fire in their bedrooms? NO, this is NOT SUITABLE for children. they are far too damn impressionable, they might start walking around talking to people in badly translated two line broken english, like “give me the tomato for the old man” or something stupid like that. NO! not right at ALL.

And then we have the old man on the mountaintop. I was too lazy to go that far into the game, but basically he gives you a little parchment and says “give this to the old woman”. There is no statement of what is ON the paper, and most people might assume it’s a recipe or some shit. But no, I’m almost certain it’s a picture of somebody nekkid. it always is. Sure, there are little lines on the side of the parchment implying text, but those are just stink lines from the actual subject. And His vague suggestion “the old woman” Like, for fuck sakes man, there are like 10 or 20 fucking old women living in caves in this god forsaken shit-hole of hyrule, which fucking old woman do you want me to give it too? Oh, wait, let me guess you old liver-spot ridden old dustbag, it’s the one wearing red. well they all wear red, god damn it.

And then you go into a cave and the assholes are all, “I’ll take 10 rupees for the door repair” and it’s like, WTF, that wasn’t a fucking door, it was a god damn cliff wall, you fucking weirdo, I’m LOOKING FOR FUCKING TREASURE. If you don’t have treasure, just tell me you don’t. What the FUCK do you want 10 rupees for, I mean, shit, you poke the god damn roof and the rocks tumple back down, there, your god damn door is repaired, you miserly old coot.

And those damn moblins in the caves, all “It’s a secret to everybody”, stop telling me to shush and get the hell outside and start shooting arrows out your belly like the rest of your kind, you lazy bastard. Get a god damn job. Bloody moblins, always “oh, it’s a secret, here, have some rupees” Like, god dammit moblin, I know these rupees are either from drug money or from your pimping, But I’ll be damned if I’m going to refuse rupees.

And then we have the graveyard. here, you touch a gravestone, and a ghost appears. How many young, impressionable children do you think saw this and went to a graveyard and tried to summon ghosts? A bloody lot of the little fuckers, that’s how many, And you can be damn sure at least 14 of the little shit-eaters became zombies, It’s mathematically proven via a number of statistical models that kids+graveyard =… well, actually, nobody really knows what it equals, but it sure as hell cannot equal chocolate cake, if that’s what your thinking.

If your thinking that only the first zelda is an offender, well, you’d be wrong.

Legend of Zelda, The - Ocarina of Time (U) (V1

What do you see wrong with this picture? Looks innocent enough. BUT! It’s important to realize that people, and fire dragons, lock their god damn doors for a reason. What if you were to catch them nekkid or something? huh? I mean, for god’s sake, don’t bosses get a little god damn privacy? anybody ever think, “shit, you know, maybe these bosses really just want to be left alone” they evidently don’t WANT to fight you, or there would be a huge sign and the door wouldn’t be locked and the key hidden in an ornate treasure chest halfway across the dungeon.

And half the time, the boss doesn’t even really do anything to provoke you- you just, for example, start smashing them in the head with a bloody sledgehammer. does THIS give a good impression to kids? Smash things with a sledgehammer first, ask questions later. NO! they are too impressionable!

mahsmokes

As you can see above- the dragon may LOOK fearsome, but you can see that look in his eye- you know, the one that says, “where the fuck are my god damn SMOKES! who took my smokes! I don’t need a fucking lighter, my hair is made of fire for christ sake, but if I don’t get my smokes I’m gonna get really tempermental” you really think smashing it’s face with a sledgehammer will make it feel any better? I mean, he just quit cold turkey, have you ANY idea what that’s like? just look at the poor guy. He has the look of somebody who just quit smoking, finished there coffee, and now REALLY wants a cigarette, but can’t have one. a look of pure helplessness. and we are just supposed to smash the c-button and smush his face with a hammer? No, actually we’re supposed to do that then fuck up his face with a sword, too.

Posted By: BC_Programming
Last Edit: 04 Feb 2010 @ 05:39 AM

EmailPermalinkComments (0)
Tags
Categories: Programming
 14 Dec 2009 @ 7:02 PM 

Lately, I’ve heard a lot of talk about “Registry Boosters” and “PC speeder upper’s” and fix-it programs. They make big claims, and it seems that a lot of their customers refuse to accept that they paid for something that was either a scam or completely useless.

I have decided to put some of these programs to the test. The idea is simple; under various conditions, run the program “scan”- probably watching the program with process monitor. Then ensure everything works properly.

The test I have decided on so far will use a VMWare Workstation Guest OS, namely, XP Pro.

For each program I wish to test, I will start with a CLEAN install of the XP SP3 OS.

First, I will run the program right away- right after the clean install. Then, after another clean install (I will probably make a clean install Image) I install a number of common applications; MS Office XP, Visual Studio, and a few freeware programs such as IMGBurn. Then I will run the “booster” again. Making sure to test each program afterwards.

Each run will be monitored with Process Monitor; I’ve found that some of these “Scam” programs hardly access the registry at all, and simply make a claims of bad entries. Obviously, these are complete scams. There are also programs that do very little but are purported to make the PC much faster, a claim that I aim to disprove based on the fact that it simply doesn’t make sense. IF it does make the PC faster it is not in the order reported and likely has a few trade-offs that either aren’t reported or simply aren’t known.

I am uncertain what programs I will test with this method; suggestions are welcome. It won’t be hard to develop a list, however, through a quick web search. Also, I aim to put the copy of System Mechanic andFix-it Utilities I have to work, too. See just how “comprehensive” these utilities really are.

Posted By: BC_Programming
Last Edit: 14 Dec 2009 @ 07:02 PM

EmailPermalinkComments (0)
Tags
Categories: Programming
 07 Dec 2009 @ 10:14 PM 

When first encountering a x64 based system running windows, one of the first questions posed is often, “what is C:\program files (x86)?” The simple response is that it is the equivalent of Program files on 32-bit systems; that is, 32-bit program files are installed there. This is true; but this is far from the only difference between the two systems and their file systems.

There is, however, further redirection within both other folders as well as The registry.

For example, the “real” %systemroot%\system32 folder actually stores the x64 system files; the 32-bit files are stored in %systemroot%\syswow64. However, when a 32-bit application access this system32, Windows automatically redirects all requests to the syswow64 folder, so accessing, say, “C:\windows\system32\file.txt” is actually accessing C:\windows\syswow64\file.txt. This includes any file operation at all. creation, editing, etc. there are a few folders exempt from this redirection- that is, they are not redirected. these folders include %windir%\system32\catroot,windir%\system32\catroot2,%windir%\system32\driversstore (this folder is redirected on all pre-windows 7 systems),%windir%\system32\drivers\etc,%windir%\system32\logfiles,%windir%\system32\spool. There are a few other features, for example, running “C:\windows\regedit.exe” from a 32-bit program will in fact run the program from C:\windows\syswow64\regedit.exe.

An additional feature is that a 32-bit program can access the 64-bit folder, Vista adds a “sysnative” alias folder in the windows folder, by accessing C:\windows\sysnative instead of C:\windows\system32, one gains access to the real C:\windows\system32 folder rather then being redirected to C:\windows\syswow64. The caveat of this feature is that most programs have validations before they accept a filename; since sysnative is not an actual folder but rather an alias used by the redirector, many validations (including the standard Open/Save dialog) can fail, meaning that one cannot “force” the access to a specific file. the main purpose is for use by the application for various reasons, not so users can access files within the folder from 32-bit applications.

The registry posesses redirection as well; the HKEY_LOCAL_MACHINE hive on x64 systems contains a key called “Wow6432node”, when a 32-bit program accesses, for example, “HKEY_LOCAL_MACHINE\Software\company\app”, they are in fact accessing “HKEY_LOCAL_MACHINE\Wow6432node\company\app”- basically, it separates 32-bit machine-specific data from 64-bit data. The only caveat is that, unlike the file system redirections, registry accesses are “mirrored” across the two; for example, COM classes are stored in HKEY_LOCAL_MACHINE\software\classes. when either HKEY_LOCAL_MACHINE\software\classes or HKEY_LOCAL_MACHINE\wow6432node\classes are have keys within changed, the change is reflected to the other location.

Additionally, certain 32-bit compiled applications can be given special treatment; if the image file (exe,dll, ocx) has the IMAGE_FILE_LARGE_ADDRESS_AWARE flag set, wow64 (the windows 32 on windows 64 emulation layer) gives it a 4GB user-mode address space, whereas with a 32-bit system it would be given a 2GB user mode address space. the flag is required, rather then being the default behaviour, because such large addresses may not have been expected when the program was written; therefore, by adding the compiler flag, you are telling windows “yes, I understand and am able to deal with the larger address space in my program”. It doesn’t actually do anything to the program itself, just changes how windows deals it memory.

another special-case is with regard to program installers for some older 32-bit programs. Many such programs used a stub 16-bit windows 3.1 program to determine the windows version, and then, launch the 32-bit installer if possible. Since 64-bit windows cannot run 16-bit applications, Microsoft decided to hack about a little fix; the followint 16-bit installer technologies have 64-bit equivalents that will be launched instead:

Microsoft Setup for Windows 1.2
Microsoft Setup for Windows 2.6
Microsoft Setup for Windows 3.0
Microsoft Setup for Windows 3.01
InstallShield 5.x

the list of such redirections can be found in HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\NtVdm64, the 64-bit equivalents are found in Syswow64.

For the most part, these changes make using a 64-bit operating system nearly indistiguishable from using it’s 32-bit equivalent; windows itself bears the brunt of the change, and the application developers pick up a little of the tail-end of it.

Posted By: BC_Programming
Last Edit: 07 Dec 2009 @ 10:14 PM

EmailPermalinkComments (1)
Tags
Categories: API, Programming, X64
 28 Nov 2009 @ 3:59 PM 

In my previous entry, I discussed and provided code that would allow for the detection of Triple-Clicks on a window. By extending the provided architecture, it is relatively trivial to allow any number of consecutive clicks; for example, detecting pentuple clicks.

More »

Posted By: BC_Programming
Last Edit: 28 Nov 2009 @ 03:59 PM

EmailPermalinkComments (0)
Tags
 20 Nov 2009 @ 7:58 AM 

Visual Basic 6; and, well- nearly any other relatively modern language; provides a way to detect mouse events. These usually include mouse down, mouse up, mouseclicks, and double clicks. Absent are any higher “N-clicks”; I speak, for the most part, of the triple click. More »

Posted By: BC_Programming
Last Edit: 20 Nov 2009 @ 07:59 AM

EmailPermalinkComments (0)
Tags
Change Theme...
  • Users » 19
  • Posts/Pages » 18
  • Comments » 4
Change Theme...
  • VoidVoid
  • LifeLife
  • EarthEarth
  • WindWind
  • WaterWater
  • FireFire « Default
  • LightLight