Author Topic: Board move delayed  (Read 159 times)

The Gorn

  • Your agonizer, please. And be sure to keep the batteries charged!
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 14170
  • Gornix user
    • View Profile
Board move delayed
« on: February 21, 2010, 12:03:39 am »
I have worked with the conversion script I described a few days ago and I have found that it messes up some of the contents of message threads.

Text gets dropped, some threads are incomplete, bizarre posting dates like 1930 are concocted (note: part of this is Yuku's fault since occasionally it has out of range posting dates in older threads).  

And some people here use the reply message subject line to follow up. The script currently ignores the reply message subject lines. All posts in a thread get the same, original subject text. So some threads don't make any sense to follow because the post titles aren't the original ones posted.

If anyone knows Python and is willing to take a look at this stuff, please PM me privately.  I am having real problems with the regular expressions that this guy is using.

I don't think I will "tip" the author. This code is too brittle and only the author knows how to fix it. And I have poured quite a bit of time into it.

To me, regular expression based code seems simple and elegant. Also impossibly brittle and flaky, and just about impossible to maintain, after this experience.
« Last Edit: February 26, 2010, 07:45:55 pm by G0ddard B0lt »
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.


Origisaurus

  • Wise Sage
  • Wise Sage
  • *****
  • Posts: 1675
    • View Profile
Board move delayed
« Reply #1 on: February 21, 2010, 10:56:08 am »
If you're postponing, I suggest you open up the formerly non-MBA forums.
Avatar is from the cover of the November 2007 National Geographic.  Fair use is assumed.

The Gorn

  • Your agonizer, please. And be sure to keep the batteries charged!
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 14170
  • Gornix user
    • View Profile
Board move delayed
« Reply #2 on: February 21, 2010, 08:26:49 pm »
"Open up" can mean so many things in the context of this board's security features that I will take a stab at what you mean (I'm not being sarcastic, two different logins can have wildly different visibility into the board) -

If you mean, make most of the public-safe sections visible so they show up to a non logged in user - just done.

I needed to hide everything while I was debugging the conversion script. This allowed me to make individual sections visible to the script in order to test changes to it. (In other words I would test the script on a very small section like Rookie Questions - so I could get a result in a few seconds instead of several hours of processing one of the larger sections.)
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.


The Gorn

  • Your agonizer, please. And be sure to keep the batteries charged!
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 14170
  • Gornix user
    • View Profile
Problems Fixed! Tentative Plan...
« Reply #3 on: February 23, 2010, 04:41:22 pm »
I plan to do the move next weekend (the 27th or 28th.)

I coded around the major deficiency in the script, which was that it dropped all followup post subject text (with the original conversion, every post in the thread had the same subject line as the overall topic, which is not correct.) I fixed it in a marathon session yesterday.

Now I have about a dozen minor issues with the exported data that I intend to code around, but they will be easy.

And, thanks to the two volunteers I had from this board who expressed a willingness to look at the issue.

There will be specific when, where, what, how instructions and explanations at the appropriate time. You will get your same user name on the new board, without registering, and you will have control over any postings you made here that are exported over there. And the private section will remain private to the same group as before and still invisible to the net overall.
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.


Origisaurus

  • Wise Sage
  • Wise Sage
  • *****
  • Posts: 1675
    • View Profile
Great!
« Reply #4 on: February 23, 2010, 05:39:00 pm »
I took one look at that regular expression and was glad I don't do that stuff any more.  Kind of like the time a colleague and I spent several afternoons creating a processing algorithm in FORTRAN with functions within subscripts, etc.  But like Roger Murtagh, I'm gettin' too old for that shit.
Avatar is from the cover of the November 2007 National Geographic.  Fair use is assumed.

The Gorn

  • Your agonizer, please. And be sure to keep the batteries charged!
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 14170
  • Gornix user
    • View Profile
re: Great!
« Reply #5 on: February 23, 2010, 06:12:01 pm »
I had to get subtle and crafty with this expression and with the entire problem. I eventually figured out how the author thought, and I figured out how to make the changes I needed which were in the same style as the  rest of the script. Basically my problem was caused by fighting the code too much.

I don't ever know how up front to avoid that flailing around stage. Sometimes the logic behind a piece of code is just alien, and it takes longer than you'd expect. You just need to stare at a problem and somehow, it becomes transparent after enough time.

It turns out that there were about 5 or 6 key lines that had to change. That's *it*.

I have no idea how a person charges for this kind of work commercially.

Any PhB would dismiss my 10 or so hours invested in this as obviously an  attempt to overbill for my lame and stupid lack of ability.
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.


Origisaurus

  • Wise Sage
  • Wise Sage
  • *****
  • Posts: 1675
    • View Profile
Board move delayed
« Reply #6 on: February 23, 2010, 06:35:37 pm »
Quote from: G0ddard B0lt
Any PhB would dismiss my 10 or so hours invested in this as obviously an  attempt to overbill for my lame and stupid lack of ability.
PHB: 10 hours!  Whaddya mean, 10 hours!

Dino:  Y'know, you're right.  I shoulda said 20, but I'm willing to split the difference and bill you for 15. 

Avatar is from the cover of the November 2007 National Geographic.  Fair use is assumed.

The Gorn

  • Your agonizer, please. And be sure to keep the batteries charged!
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 14170
  • Gornix user
    • View Profile
Board move delayed
« Reply #7 on: February 23, 2010, 06:45:40 pm »
Thank goodness I don't have to justify all the time this took to anyone but myself. I don't need any more excuses to go postal on clients.
Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.


TRexx

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 4541
    • View Profile
Board move delayed
« Reply #8 on: February 23, 2010, 09:01:26 pm »
Quote
I don't ever know how up front to avoid that flailing around stage. Sometimes the logic behind a piece of code is just alien, and it takes longer than you'd expect. You just need to stare at a problem and somehow, it becomes transparent after enough time.
I suppose it's too much to expect that the author added few comments explaining what he did.

The Gorn

  • Your agonizer, please. And be sure to keep the batteries charged!
  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 14170
  • Gornix user
    • View Profile
Board move delayed
« Reply #9 on: February 23, 2010, 09:04:52 pm »
Quote from: TRexx
Quote
I don't ever know how up front to avoid that flailing around stage. Sometimes the logic behind a piece of code is just alien, and it takes longer than you'd expect. You just need to stare at a problem and somehow, it becomes transparent after enough time.
I suppose it's too much to expect that the author added few comments explaining what he did.
In general, with free stuff like this - yes, always, almost without exception.

Gornix is protected by the GPL. *

* Gorn Public License. Duplication by inferior sentient species prohibited.


Origisaurus

  • Wise Sage
  • Wise Sage
  • *****
  • Posts: 1675
    • View Profile
Board move delayed
« Reply #10 on: February 23, 2010, 10:07:17 pm »
Quote from: G0ddard B0lt
Quote from: TRexx
Quote
I don't ever know how up front to avoid that flailing around stage. Sometimes the logic behind a piece of code is just alien, and it takes longer than you'd expect. You just need to stare at a problem and somehow, it becomes transparent after enough time.
I suppose it's too much to expect that the author added few comments explaining what he did.
In general, with free stuff like this - yes, always, almost without exception.
The trouble with regular expressions is that they are a very terse way of expressing selection criteria.  And they can become pathological, like the one we saw here.  To document that one might take a page or so of English or a SQL WHERE clause. You either grok REs or you don't.

Avatar is from the cover of the November 2007 National Geographic.  Fair use is assumed.

John Masterson

  • Administrator
  • Wise Sage
  • *****
  • Posts: 7976
    • View Profile
Reg Ex calculator
« Reply #11 on: February 24, 2010, 12:27:24 am »
I'd have to have one of those reg Ex makers I seem to remember with a front end form that you fill on with the search and replace criteria, and it automatically generates the proper Reg Ex.

Do they even have Reg Ex "decompilers" that translate a Reg Ex to back English with a mapping so you can see what it does and alter it?



I D Shukhov

  • Trusted Member
  • Wise Sage
  • ******
  • Posts: 3358
    • View Profile
Reg Ex "decompiler" -- great idea!
« Reply #12 on: February 24, 2010, 10:30:19 am »
It would take a source file, in any language, and add comments before the regex line explaining in plain English what it is doing -- no more human reverse-engineering of the thing.  Then you could write regex-intensive code all day long without hampering the future maintainers.



Anything that won't sell, I don't want to invent.  Its sale is proof of utility, and utility is success. – Edison

Origisaurus

  • Wise Sage
  • Wise Sage
  • *****
  • Posts: 1675
    • View Profile
re: Reg Ex "decompiler"
« Reply #13 on: February 24, 2010, 12:04:27 pm »
My google results.

Necessity is the mother of invention.  If we elderly geeks saw a need, some other geeks have seen it and acted on it.
Avatar is from the cover of the November 2007 National Geographic.  Fair use is assumed.

Slinky

  • Trusted Member
  • Guru
  • ******
  • Posts: 385
  • Gold Plated Slinky
    • View Profile
Awesome!
« Reply #14 on: February 24, 2010, 04:49:53 pm »
Goddard,

Thanks for all your work. I've migrated several forums by now, and I know how much PITA migrations can be. Really looking forward to moving off Yuky.


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf