Forgot your password?
typodupeerror
User Journal

Journal: Fun with SQL Server 2012 6

Journal by Marxist Hacker 42

I have a Table Valued Function that returns a simple parameterized view. I want to turn that view into a string.

Can anybody tell me why the first query works and the second one doesn't?

DECLARE @JobID INT
DECLARE @strOut VARCHAR(MAX)

SET @JobID=2861

SELECT @strOut =Coalesce(@strOut +',','')+ ISNULL('[' +
MP.ModelPointName + '] int', 'ErrorInFactoryModel int')
FROM (SELECT TOP 800 ModelPointName, Sequence
      FROM dbo.GetReferencedModelPointsByJobID(@JobID)
      ORDER BY Sequence) MP
WHERE NOT (MP.ModelPointName LIKE '%Ship%'
        OR MP.ModelPointName LIKE '%Scrap%')

PRINT @strOut

SET @strOut=NULL

SELECT @strOut =Coalesce(@strOut +',','')+ ISNULL('[' +
MP.ModelPointName + '] int', 'ErrorInFactoryModel int')
FROM dbo.GetReferencedModelPointsByJobID(@JobID) MP
WHERE NOT (MP.ModelPointName LIKE '%Ship%'
        OR MP.ModelPointName LIKE '%Scrap%')
      ORDER BY Sequence

PRINT @strOut

The 2nd one returns a single field name, the first, returns all the field names.

User Journal

Journal: Trying to remember a conspiracy theory 6

Journal by Marxist Hacker 42

Back in the early 1990s, when CD Roms were first invented, on major use of them was for the conspiracy dial up bulletin board system. With a CD Rom online on your bulletin board, you could "host" a CD full of downloadable text files on everything from government cover-ups to UFOs.

I was into such things at the time, and read many of these files.

Fast forward to today- and Pope Francis gives us a conspiracy theory: that rich first world nations are promoting war in the third world as a prop to economics. All over the first world Catholic blogosphere, there is outrage- how dare the Pope tell us capitalism is supported by warfare?

Of course, Dwight Eisenhower, upon leaving the U.S. Presidency said the same thing,- warned us about the military industrial complex.

But I seem to remember a "secret" document passed around those old BBSs from the Vietnam Era that basically said the same thing, only actually recommending it as a policy. Does anybody else remember this document? Can you remember something I can google on? I'm coming up empty.

User Journal

Journal: These are the things in my head at night 7

Journal by Daniel Dvorkin

Then-PFC, now-SGT Bergdahl may in fact have deserted his post. There are certainly credible accusations to that effect, and if so, then he should be tried and convicted for the crime. But it's a whole lot easier to investigate those charges with him here, and we don't let the Taliban mete out justice for us.

The military idea of "taking care of your own" has a lot of different aspects. Holding the line and leaving no one behind are obvious; less obvious, perhaps, is that our people are ours. Loon or no, deserter or no, even traitor or no, whatever else Bowe Bergdahl may be he is someone who raised his right hand and took the oath, and that means that whatever reward or punishment he receives is ours and ours alone to give.

It astonishes me sometimes, having at this point been out of the service several more years than I was in it, how strong and pure those ideas still are in my head: how much "us" the profession of arms still is to me, and I suppose always will be. I'm a civilian and happy to be one now, but both the infantryman and the medic are still very close to the surface. The latter is concerned mainly with bringing back the wounded--and the former is ready, willing, and perhaps even eager to kill anyone who stands in the way of that mission.

Whatever else we did, whatever else we may do, we had to bring him home.

User Journal

Journal: MSS Code Factory 1.11 has been released to production

Journal by msobkow

This day had to come eventually. It was just a matter of patience, persistence, and time.

Today I released MSS Code Factory 1.11 to production.

This is the first time I've ever released a piece of software because I honestly believe it's ready to be released rather than because some marketing/sales rep or management had set an arbitrary delivery date.

This release was 4 years in development. The project itself was started 18 years ago.

But my baby has all grown up, and it's time to send her out the door into the wild, wild world.

If I were to die today, I'd die knowing I accomplished something with my life.

This has been the mountain I had to climb; the ocean I had to sail; the desert I had to cross. It has been my mission ever since I first conceived of the idea of manufacturing code by reversing the logic of a compiler/parser way back in my University days.

For those of you who are programmers, please download and play.

http://msscodefactory.sourceforge.net/

By the way, as a side effect of the testing and validation of MSS Code Factory itself, I produced CFUniverse, a conglomerate business application model project that is nearly 14,000,000 lines of source code. To put that in perspective, the biggest project I ever worked on was about 1.5 million lines, coded by a team of over 150 developers over a 3 year period. Were you to print out CFUniverse at 100 lines per page, double-sided, you'd need 5 cases of paper plus another 20 reams to do it.

I'd love to dump that sucker on someone's desk for a code review!

User Journal

Journal: Which is more dangerous, theology or ideology? 15

Journal by Marxist Hacker 42

This article insists that for human beings, belief is not optional. There are two basic types of beliefs- religious theology and political ideology- but all human beings, even atheists, have some form of belief.
 
  A study of war would seem to indicate that the 20th century clearly showed that ideology is more dangerous than theology, but since fighting for religion has never really gone out of fashion, what do you think?

User Journal

Journal: MSS Code Factory 1.11 is almost done

Journal by msobkow

Within the next week or few, I should be releasing MSS Code Factory 1.11 to production.

1.11 has been a 4 year effort, kickstarted by some rule sets from previous versions of the tool. Each of the earlier versions encountered problems which sent me back to the drawing board to resolve the issues I encountered, going so far as to migrate the core engine code to C# at one point, and then back to Java again, all in an effort to clean up the last bugs in the core technology (the effort was successful, but it was a good two years of my time to do it.)

As I write this, I realize that it's been roughly 18 years since I created the 1.0 version of MSS Code Factory using Java JDK 1.0. I've believed in the "write once, run anywhere" philosophy since day one, and bought into the "Network Is The Computer" concept as well. Hence my decision to focus the efforts of MSS Code Factory on Java, rather than diverging into other languages such as C# or C++ (although there is absolutely no reason I couldn't produce code for those languages, sharing the same database models and stored procedures that the Java code relies on.)

18 years.

My precious is almost an adult.

Just a few more weeks of database script testing, more to find and correct issues with the Business Application Models than with any expectation of long-term problems with the database installation scripts as manufactured by the tool.

At the point of release as a side-effect of testing, I'll have created CFUniverse 2.0. A mammoth general purpose database/schema/application comprising 366 tables and nearly 14,000,000 lines of source code.

Top that, 'ya slackers!

User Journal

Journal: A geeky theory 8

Journal by Marxist Hacker 42

The multiverse theory is as falsifiable as God himself. Therefore, I have a theory of sociology- that anybody believing in the multiverse has simply fallen for a new religion created by comic books and bad science fiction.

User Journal

Journal: Lies, damned lies, and ... oh no, you're going there. 1

Journal by Daniel Dvorkin

[cranky rant warning]

"Lies, damned lies, and statistics." It's coming up again with depressing frequency, being used as an argument instead of a snide observation.

Okay, here's the thing. Can you lie with statistics? Sure. Statistics is a branch of mathematics*, and math is a language; you can lie in that language as easily as in any other. Does this mean all statistics are lies? No more than all statements in any language are lies--and if you believe that, you've gone so far down the rabbit hole of anti-intellectual mysticism that you'll probably never find your way out.

Meanwhile, in the real world, and in the ever-expanding torrent of data we have about that world, statistics as a discipline is pretty much the only hope we have of understanding anything. The low-hanging fruit has been picked. The equations we learn in Physics 101 are as valid as they ever were, but they're not nearly enough. No matter how certain you think you are, no matter how many times you repeat your experiment and get the same result, if you don't do the statistical tests you don't actually know whatever it is you think you know. And if you do the tests--well, you may still be wrong, but you can at least quantify your uncertainty. And you have to do that, because you can always be wrong.

None of this is meant to defend the misuse of statistics, any more than as a writer I'd defend the misuse of natural language. People can and do wilfully misinterpret statistics, or cherry-pick them, or just outright make them up, and those are bad things. Guess what? They do that with every other kind of statement too. At least half of statisticians' job is fact-checking, and it's a charge we gladly accept.

So the next time you're tempted to say "lies, damned lies, and statistics," or "figures don't lie but liars figure," or "correlation does not imply causation" or any of its variants, or post the umpteen-thousandth link to "How To Lie With Statistics," and think you're being clever--please, just stop. Because one thing I am so sure of that I don't even need to put a p-value on it is that if you feel the need to resort to any of those lazy, thought-free responses, you don't know enough about the issue at hand to have an informed opinion, and the best thing you can possibly do for yourself and everyone else is to keep quiet.

*Opinions vary on this issue, but if statistics isn't exactly a branch of mathematics, we can at least say that math is the language in which it's written.

User Journal

Journal: What's your favorite JQuery suite? 5

Journal by Marxist Hacker 42

Ok, I'm stretching a bit as a programmer in my current contract, because they're thrilled with the timeframe I've given. This contract is finally allowing me to learn MVC, which means *next* contract I'll be able to command a much higher rate.
 
However, using MVC on Microsoft tools means abandoning Ajax. I really need a good "Date/Time" control and a good cascading combobox. Anybody have any suggestions for an open source JQuery suite I should examine?

Time is nature's way of making sure that everything doesn't happen at once. Space is nature's way of making sure that everything doesn't happen to you.

Working...