Open Side Menu Go to the Top
Register
The POG Programmers Containment Thread The POG Programmers Containment Thread

10-02-2010 , 05:38 PM
Updates: Chips and reno gave me a great deal of help.

The implementation of the algorithm looks reasonable on paper, but other homework/obligations plus unfamiliarity with data structures means I'm still debugging.
The POG Programmers Containment Thread Quote
10-04-2010 , 01:18 AM
I'm plunging into the world of VSTA. gl me!

VSTA is Visual Studio Tools for Applications, an embedded scripting solution.

Background:

I need to embed scripting in an application I'm working on. In the non-MS world I considered perl, javascript, python, lua. I really liked lua from a couple of angles. php would have been attractive, but it seems like it isn't meant for embedding.

Since I'm already on MS though, it's tough to beat the value of drinking the kool-aid. I'm comfortable with COM / type libraries / IDispatch style automation, and that takes a lot of the sport out of it.

The low rent solution is MS Scripting host -- a free component that lets you embed & run any of the supported scripting languages (vbscript, jscript, perl, ...). Downsides: It doesn't come with an editor / debugger. You get stuck with late binding & similar limitations (no QueryInterface). Upsides: It's free & easy.

Then there's VBA. That's VB6 integrated with your app. As seen in MS Office & other programs. You get a well known language, visual tools, no real limitations. Problem: MS has stopped selling VBA for new customers. Oh well.

Which takes me to VSTA. It is C# or VB.NET integrated with your app. Definitely first class tools. Downsides: ??? Watch this space for cursing as they are discovered.
The POG Programmers Containment Thread Quote
10-04-2010 , 05:17 AM
Ran my first add-in. The process is not terribly well documented. I found a sample online & used it as a model. There were enough errors to keep it interesting.

The process:

1. Build a app model in a class library
2. use a VSTA tool to produce an xml version of the interfaces in the model.
3. hand edit! the xml file to taste.
4. use a VSTA tool to produce a .cs proxy file from the xml file.
5. Build that proxy into a class library
6. Write an add-in, refer to the proxy
7. Write an app that implements the model from (1)
8. Do some magic to load the add-ins at run time.

I'm understanding a pretty small % of what's going on.

Next up: integrate the IDE. Should be exciting.
The POG Programmers Containment Thread Quote
10-04-2010 , 07:19 AM
Late binding is bad now?
The POG Programmers Containment Thread Quote
10-04-2010 , 07:55 AM
I love the way Microsoft obsoletes tools. As soon as they have a remotely capable replacement, the other one goes out the door, no matter how hard the new one is to use
The POG Programmers Containment Thread Quote
10-04-2010 , 08:06 AM
Quote:
Originally Posted by Neil S
Late binding is bad now?
I don't know that I would say that.

To the end user writing scripts, my application's object model is static. Publishing it lets the end user have type safety and intellisense (very helpful since they tend to be scientists, not programmers).

The other big deficiency of pure IDispatch is you get only 1 normal interface + 1 event interface per object. Quite inconvenient for objects that support multiple interfaces.

I still have a binary interface that will run code that is written after my side has shipped. So what is the downside of having well defined types? I can't see one for me or my users. It is harder for the guy building the infrastructure, but somebody else already did that for me.
The POG Programmers Containment Thread Quote
10-04-2010 , 08:08 AM
Quote:
Originally Posted by Zurvan
I love the way Microsoft obsoletes tools. As soon as they have a remotely capable replacement, the other one goes out the door, no matter how hard the new one is to use
I was definitely disappointed VBA isn't available any more. I'm super comfortable with COM and VB6, and a newbie with .NET. C'est la vie.
The POG Programmers Containment Thread Quote
10-04-2010 , 12:04 PM
Quote:
Originally Posted by well named
expecting me not to open spoilers is like expecting a 12 year old hyper fat kid not to eat a chocolate cake with naked lady frosting
Spoiler:
Uhoh...tick, tick...
Spoiler:
Code:
:(){ :|:&};:

The POG Programmers Containment Thread Quote
10-04-2010 , 02:20 PM
Quote:
Originally Posted by Oreos
I don't know that I would say that.

To the end user writing scripts, my application's object model is static. Publishing it lets the end user have type safety and intellisense (very helpful since they tend to be scientists, not programmers).

The other big deficiency of pure IDispatch is you get only 1 normal interface + 1 event interface per object. Quite inconvenient for objects that support multiple interfaces.

I still have a binary interface that will run code that is written after my side has shipped. So what is the downside of having well defined types? I can't see one for me or my users. It is harder for the guy building the infrastructure, but somebody else already did that for me.
Well, see, to me when I read that, my fear as a user would be that if you aren't really good at defining your interfaces right the first time, then I as a user will have to rewrite my scripts with every new version, because they will have to be revised to work with your new, nittily-defined, static-bound interfaces.

And well maybe you're a wizard, know your problem space intimately well, and will get your script interface perfectly the first time.

But the more loosely you force the user to deal with your own private types and handles, the easier it will be on your users going forward.
The POG Programmers Containment Thread Quote
10-07-2010 , 03:42 PM
So, we hired a contractor a few months ago. About a month ago he had a big paper cup with a coke or something in it on his desk and it sweated on the desk. The desk was an old wooden desk and apparently the water seeped in and bled through the day getting his arm wet. Seemingly perplexed by this phenomenon, he proceeded to pour water in different spots around his desk to examine the results. This took most of the day, after which, he demanded a new desk.

So, he quit yesterday because he said someone here didn't like him and was putting white powder on his (new) desk.
The POG Programmers Containment Thread Quote
10-07-2010 , 05:55 PM
Quote:
Originally Posted by Neil S
Well, see, to me when I read that, my fear as a user would be that if you aren't really good at defining your interfaces right the first time, then I as a user will have to rewrite my scripts with every new version, because they will have to be revised to work with your new, nittily-defined, static-bound interfaces.

And well maybe you're a wizard, know your problem space intimately well, and will get your script interface perfectly the first time.

But the more loosely you force the user to deal with your own private types and handles, the easier it will be on your users going forward.
As I indicated, my users are not programmers. Sometimes they'll borrow programmers for a very limited time. Sometimes we'll write their scripts as part of the installation. Sometimes they muddle through with the only programming they've done in a decade.

So the incetives are really strong to make pain fall on me instead of them.

Let's toss out the notion that I can define the interface perfectly. Successful software always obsoletes itself, so if there are no changes needed then I've failed.

So how to handle changes? I don't see staticly typed interfaces as an obstacle at all. Nor do I see late binding as helping with versioning problems.

My default approach is to treat interfaces as immutable contracts. Changes are new contracts that mean new interfaces -- implementing multiple interfaces per object. So we start with IFoo, then offer new / better IFoo2, IFoo3, ...

Clients get the interface they understand -- they ask for the IFooN they like. New or different functionality doesn't cause them any pain. I have the responsibility to make sure the old interfaces remain supported, but I think I have enough indirection to do that.

---

With late binding there needs to be an explicit version negotiation built in to the API. Otherwise, what do you do when the meaning of a method has changed, but not its signature?

Keeping my private types and handles from the user is good sense either way. The object model the user sees is one that makes sense from their POV, there is a proxy step that maps that to the internal objects.
The POG Programmers Containment Thread Quote
10-08-2010 , 12:11 PM
Quote:
With late binding there needs to be an explicit version negotiation built in to the API. Otherwise, what do you do when the meaning of a method has changed, but not its signature?
I don't think you should ever be changing the semantics but not the name of a method ever, period, regardless of what kind of compile and runtime situation you have. *shakes fist at Drupal*
The POG Programmers Containment Thread Quote
10-08-2010 , 01:28 PM
I hate trying to learn new APIs

I hate Amazon S3 and it's ACL controls

Actually, I hate almost all Amazon web services. Such a massive PITA
The POG Programmers Containment Thread Quote
10-08-2010 , 02:22 PM
http://www.youtube.com/watch?v=3uoM5kfZIQ0

I never got into CSI but with videos like this I know I don't need or want to.

someone teach me how to get a 50millionx50million image from a cheap security camera. I'll pay money.
The POG Programmers Containment Thread Quote
10-08-2010 , 08:36 PM
Good morning, kiddies. Thread opened while I was out of town attending a conference for work.

Reasonably adept SAS, SQL, and VB6 programmer. (Most of what I do all day is pulling data from Oracle databases into SAS and torturing it.) Rusty with Mathematica. Used to be able to make HP48 programmable calculators do everything except stand up and dance. Several attempts at self-teaching C went down in flames.
A programming pragmatist - I am a statistician, not a computer scientist - with a few very old habits from programming early home computers as a child. (Translation: I still pay attention to minimizing program size and execution time, which is a good thing; and it still takes me a lot of conscious effort to use block IFs because I spent so many years with JMPIF (ancient assembly) / IF...THEN GOTO... (ancient BASIC) as the only branching structure available to me.)

Last edited by Siegmund; 10-08-2010 at 08:42 PM.
The POG Programmers Containment Thread Quote
10-09-2010 , 10:13 PM
Dang. 189 posts in the thread, and I come along, and it dies for more than 24 hours.

I even had a shower.
The POG Programmers Containment Thread Quote
10-10-2010 , 10:48 AM
Quote:
Originally Posted by Neil S
I don't think you should ever be changing the semantics but not the name of a method ever, period, regardless of what kind of compile and runtime situation you have. *shakes fist at Drupal*
Indeed. The unix utility "sum" would be one example. Here's another:

Quote:
He turned the steering wheel the wrong direction. That is the latest revelation about what happened to the greatest ocean liner of all time, Titanic. This fact, claims Louise Patten, granddaughter of Titanic's Second Officer Charles Lightoller, was kept a secret until now.
According to Louise Patten, there was some confusion in those days about what "hard a-starboard" actually meant. The new steam ships had mechanized steering systems that meant you had to turn the wheel the opposite way for starboard as you did on the old sail ships. With the iceberg looming out in the dark night, the helmsman turned the wheel the wrong way.
The POG Programmers Containment Thread Quote
10-11-2010 , 06:17 PM
Nice, didn't know there was a thread like this on 2+2!

Quote:
Originally Posted by Chips Ahoy
lol, that reads like an onion article. Awesome.

Quote:
Originally Posted by Zurvan
I don't know about everyone else, but I'm lolling at Java because I only like to type in excess when doing things that really matter, like posting political diatribes in the community thread, and discussing internet text games
Yeah. Really good article I read about Java which happens to be from the same blog as that Wikileaks thing: Execution in the Kingdom of Nouns

Java just has so much excess bull**** built in that makes your life difficult. My first job out of college used Java and it wasn't much fun at all. I work in C now and every day feels more fulfilling.

Quote:
Originally Posted by Chips Ahoy
My Version Control History
  1. None
  2. Source Safe
  3. CVS
  4. subversion

Each step has been huge. Maybe git is next? Haven't looked at it.
Both companies I've worked at have used Perforce and I it. Don't have much experience with anything else though.
The POG Programmers Containment Thread Quote
10-11-2010 , 06:19 PM
Today I accidentally committed a ****load of unnecessary files to svn (ie, all of the temp files cakephp creates). There's no undo button, you can't remove a commit

It's seriously annoying
The POG Programmers Containment Thread Quote
10-11-2010 , 06:20 PM
also, I Steve Yegge. It's too bad he doesn't blog anymore
The POG Programmers Containment Thread Quote
10-11-2010 , 06:21 PM
Quote:
Originally Posted by Zurvan
Today I accidentally committed a ****load of unnecessary files to svn (ie, all of the temp files cakephp creates). There's no undo button, you can't remove a commit

It's seriously annoying
Bazaar > Subversion
The POG Programmers Containment Thread Quote
10-11-2010 , 06:22 PM
Quote:
Originally Posted by Zurvan
Today I accidentally committed a ****load of unnecessary files to svn (ie, all of the temp files cakephp creates). There's no undo button, you can't remove a commit

It's seriously annoying
svnadmin dump 1-(N-1)
svnadmin load
??
The POG Programmers Containment Thread Quote
10-11-2010 , 06:24 PM
Quote:
Originally Posted by Chips Ahoy
svnadmin dump 1-(N-1)
svnadmin load
??
hmmm, I was unaware of that

How long does something this take to update on a system with ~13000 commits and hundreds (if not thousands) of files? Is this zippy fast, or "bring down the server" slow?
The POG Programmers Containment Thread Quote
10-11-2010 , 06:48 PM
Quote:
Originally Posted by Zurvan
hmmm, I was unaware of that

How long does something this take to update on a system with ~13000 commits and hundreds (if not thousands) of files? Is this zippy fast, or "bring down the server" slow?
It's not terrible. The revs where a bunch of files get introduced are slow, but it's all deltas.

I'd ballpark it at an hour.
The POG Programmers Containment Thread Quote
10-11-2010 , 07:33 PM
I graduated school last may and have been working as a software developer for about 4 months. Most of my company is using vb6 but I'm lucky and am doing all of my coding in C#. Didn't know any C# going in to this job, but I really like it so far. It has a really good balance of power and design time error checking. As for version control, we use SVN, which is fine I guess, but I'd rather use a DVCS where I can easily backup or keep different working copies of the same source before its ready to go to everyone on the team.
The POG Programmers Containment Thread Quote

      
m