# Testing code tags

**URL:** <https://boards.straightdope.com/t/testing-code-tags/796468>\
**Category:** About This Message Board\
**Created:** [September 16, 2017, 3:04pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468 "2017-09-16T15:04:26Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [September 20, 2017, 3:27am UTC](https://boards.straightdope.com/t/testing-code-tags/796468/21 "2017-09-20T03:27:48Z")

</div>

```php
Do note that the 
PHP tag
    works just fine.

```

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [September 20, 2017, 2:51pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/22 "2017-09-20T14:51:57Z")

</div>

```php
	 m f
d	63	42
r	37	58

```

Hmmm… this works, but not as well. It may be a solution going forward.

However, it still doesn’t fix all the posts from the last 18 years that used ‘code’ tags and are now unreadable.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [September 20, 2017, 4:22pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/23 "2017-09-20T16:22:00Z")

</div>

> [@Lance\_Turbo](#):
>
> ```php
> m f
> d	63	42
> r	37	58
> 
> ```
> 
> Hmmm… this works, but not as well. It may be a solution going forward.
> 
> However, it still doesn’t fix all the posts from the last 18 years that used ‘code’ tags and are now unreadable.

Yeah, I know. I just brought it up because people seemed to not know.

Personally, I wouldn’t bother. Anyone who wants to see that stuff should use the old theme for now. It seems they’ve stopped doing anything on the new theme, including the fixes we’d already worked out.

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [September 26, 2017, 4:51pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/24 "2017-09-26T16:51:55Z")

</div>

Reminder…

```auto

#!/usr/bin/env python3 
words = ["Fixed", "Still", "Not"] 
print(' '.join(sorted(words)[::-1]))

```

---

<div class="post-metadata">

**Author:** ![Johnny\_L.A](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/johnny_l.a/32/1084_2.png) [@Johnny\_L.A](https://boards.straightdope.com/u/Johnny_L.A)\
**Post date:** [September 26, 2017, 8:18pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/25 "2017-09-26T20:18:51Z")

</div>

> [@BigT](#):
>
> Personally, I wouldn’t bother. Anyone who wants to see that stuff should use the old theme for now.

In other words, ‘If people want full functionality, they should use the functional theme instead of the new broken one.’

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [September 26, 2017, 8:33pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/26 "2017-09-26T20:33:32Z")

</div>

> [@Johnny\_L.A](#):
>
> In other words, ‘If people want full functionality, they should use the functional theme instead of the new broken one.’

I’ve said this in other threads, but I’ll say it here too.

No, that’s not good enough. I already have my data in a nicely formatted table before I post. I already my Python code indented properly before I post. I don’t post here so I can read my posts. I post here so other people can read my posts.

Other people includes people who use the default skin by choice and those who don’t have a choice like people who read without signing in and lurkers.

---

<div class="post-metadata">

**Author:** ![Irishman](https://avatars.discourse-cdn.com/v4/letter/i/b487fb/32.png) [@Irishman](https://boards.straightdope.com/u/Irishman)\
**Post date:** [September 27, 2017, 8:51pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/27 "2017-09-27T20:51:52Z")

</div>

I agree this needs to be fixed. In fact, I got the skin creator to fix it in his code, and posted that to Ed in his bugs thread. It may be an issue that if they update the skin, they lose all the changes that have made. But \*\*BigT \*\* has also posted direct code to fix it to that thread as well.

I suspect this has fallen into the category of “things lower in priority”.

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [October 2, 2017, 5:42pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/28 "2017-10-02T17:42:41Z")

</div>

```auto

#!/usr/bin/env python3

def recoverSecret(trips):
    out = []
    while len(trips) > 0:
        chars = set([])
        bchars = set([])
        for t in trips:
            chars |= set(t)
            bchars |= set(t[1:])
        out.append((chars - bchars).pop())
        trips = [t[1:] if t[0] == out[-1] else t for t in trips]
        trips = [t for t in trips if len(t) > 0]
    return ''.join(out)

triplets = [
  ['f','e','d'],
  ['n','o','i'],
  ['f','x','e'],
  ['t','f','x'],
  ['o','t','d'],
  ['f','i','x'],
  ['n','o','x']
]

print(recoverSecret(triplets))

```

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [October 9, 2017, 4:47pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/29 "2017-10-09T16:47:31Z")

</div>

I’m not even going to try to be clever this week.

Still not fixed.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [October 9, 2017, 8:56pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/30 "2017-10-09T20:56:14Z")

</div>

If your goal is to have code that people not logged in can read, I would use PHP for now, at least. The syntax highlighting works pretty well on other languages, so that’s a bonus.

Unfortunately, I can’t seem to override the colors with explicit numbers, so it will have colors, no matter what.

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [October 9, 2017, 10:00pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/31 "2017-10-09T22:00:23Z")

</div>

Many of my posts over the last eighteen years use code tags. My goal is that these posts, which were once readable and are now gibberish, become readable again for people using the board default.

There are thousands of posts, not just mine, in threads that might come up in a Google search that contain code tag posts that are now unreadable and may be part of this board’s first impression on a new potential user. Seeing as that the fix now involves a little cut and paste I don’t think I’m being unreasonable in harping on this.

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [October 9, 2017, 11:41pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/32 "2017-10-09T23:41:47Z")

</div>

I know. I’m not saying you’re wrong. I’m saying how to mitigate the problem for now. Because it’s clear that Ed has stopped listening right now.

At this point, I might recommend emailing Ed directly with the fixes that need to be top priority. I think this one and the spoiler quoting are the top two. And both are single line fixes.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [October 10, 2017, 2:11pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/33 "2017-10-10T14:11:01Z")

</div>

> [@Lance\_Turbo](#):
>
> ```auto
> 
> #!/usr/bin/env python3 def recoverSecret(trips): out = [] while len(trips) > 0: chars = set([]) bchars = set([]) for t in trips: chars |= set(t) bchars |= set(t[1:]) out.append((chars - bchars).pop()) trips = [t[1:] if t[0] == out[-1] else t for t in trips] trips = [t for t in trips if len(t) > 0] return ''.join(out) triplets = [['f','e','d'], ['n','o','i'], ['f','x','e'], ['t','f','x'], ['o','t','d'], ['f','i','x'], ['n','o','x'] ] print(recoverSecret(triplets))
> 
> ```

I’m bookmarking this post for the _Why C is better than Python_ thread !  
My C code works even after it’s been Sultanthemized. 🙂

---

<div class="post-metadata">

**Author:** ![dstarfire](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dstarfire/32/5762_2.png) [@dstarfire](https://boards.straightdope.com/u/dstarfire)\
**Post date:** [October 10, 2017, 8:45pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/34 "2017-10-10T20:45:09Z")

</div>

> [@septimus](#):
>
> I’m bookmarking this post for the _Why C is better than Python_ thread !  
> My C code works even after it’s been Sultanthemized. 🙂

1. give us an example

and

1. Are you TRYING to create source material for a sequel to The Da Vinci Code?!

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [October 10, 2017, 11:19pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/35 "2017-10-10T23:19:54Z")

</div>

> [@BigT](#):
>
> I’m saying how to mitigate the problem for now.

The problem for now is that [this post](http://boards.straightdope.com/sdmb/showpost.php?p=20152028&postcount=29) (and many others like it) used to be readable and are now gibberish to anyone using the board default settings. I appreciate your efforts, but nothing you have said mitigates that problem. Any suggestion that does not fix that post for some rando stumbling in from a Google search does not mitigate the problem.

---

<div class="post-metadata">

**Author:** ![septimus](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/septimus/32/410_2.png) [@septimus](https://boards.straightdope.com/u/septimus)\
**Post date:** [October 11, 2017, 1:03am UTC](https://boards.straightdope.com/t/testing-code-tags/796468/36 "2017-10-11T01:03:12Z")

</div>

> [@dstarfire](#):
>
> 1. give us an example
> 
> and
> 
> 1. Are you TRYING to create source material for a sequel to The Da Vinci Code?!

(1) That Python depends on indentation destroyed when Sultan-theme gets its hands on it is not in dispute:

> [@](#):
>
> One of the most distinctive features of Python is its use of indentation to mark blocks of code.

Here is some C code I posted recently

> [@Logarithmic Tables](https://boards.straightdope.com/t/logarithmic-tables/793079/11):
>
> Here is some real C code to compute (_but with no error-checking_) logarithm base _e_.
> 
> ```auto
> 
> /*
> * This code is loosely based on Freeware;
> * x_log() is similar to log() but does no error-checking.
> * x_frexp() accomplishes the built-in function frexp()
> * but is much slower. It is included to make this
> * wholly self-contained.
> * No copyright is claimed by Septimus G. Stevens VII.
> * Use of this code for satiric purposes is encouraged.
> */
>  
> double x_frexp(double x, int *xpon)
> {
> int	xp = 0;
> while (x >= 1)
> x /= 2, xp++;
> while (x < 0.5)
> x *= 2, xp--;
> *xpon = xp;
> return x;
> }
> 
> double x_log(double x)
> {
> double z, w;
> int xpon;
> 
> x = 1.4142135623730950488 * x_frexp(x, &xpon);
> z = 2 * (x-1) / (x+1);
> w = z * z;
> x = z;
> z *= - w * 64.124943423745581147
> + w*w * 16.383943563021534222
> - w*w*w * 0.78956112887491257267;
> z /= -769.49932108494879777
> + w * 312.03222091924532844
> - w*w * 35.667977739034646171
> + w*w*w;
> return x + z + xpon * .69314718055994530941
> - .3465735902799726547;
> }
> 
> int main(int argc, char **argv) { double atof(); printf("Log_e of %f is %f
> ", atof(argv[1]), x_log(atof(argv[1]))); }
> 
> ```

That function lacked a main() for test purposes, so I’ve appended one at the bottom, already sultanized.

Sultanize, copy-paste, compile, and type ‘a.out 23.14069263’ to verify that _this_ code can withstand Sultan’s destructive efforts.

(2) I haven’t a clue what your point is. But with approximately 99% of the world’s writing now transcripts from inportant intellectuals like Alex Jones, and gibberish from social media, I don’t think future conspiracists will have lack source material!

---

<div class="post-metadata">

**Author:** ![BigT](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/bigt/32/12044_2.png) [@BigT](https://boards.straightdope.com/u/BigT)\
**Post date:** [October 11, 2017, 2:48am UTC](https://boards.straightdope.com/t/testing-code-tags/796468/37 "2017-10-11T02:48:47Z")

</div>

I like the idea of personifying this Sultan. He’s just a programmer who hates semantic whitespace.

---

<div class="post-metadata">

**Author:** ![Lance\_Turbo](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/lance_turbo/32/6156_2.png) [@Lance\_Turbo](https://boards.straightdope.com/u/Lance_Turbo)\
**Post date:** [October 17, 2017, 2:45pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/38 "2017-10-17T14:45:22Z")

</div>

```auto

. ____. ______.___________.         
| \ | | / __ \ | |         
| \| | | | | | `---| |----`         
| . ` | | | | | | |              
| |\ | | `--' | | |              
| __| \__ | \ ______/ |__ |              
                                           
 _________  ______  ______________  
| ____|| | \ \ / / |____ || \ 
| | __| | \ v / | |__ | .--. |
| __| | | > < |__ | | | | |
| | | | / . \ | | ____ | '--' |
| __| |__ | / __/ \__ \ | _______||_______ / 
                                           
________  _______.___________.        
\ \ / / | ____ || |        
 \ \/ / | |__ `---| |----`        
  \_ _/ | __| | |             
    | | | | ____ | |             
    | __| |_______ | |__|             
                                           

```

Just checking in.

---

<div class="post-metadata">

**Author:** ![Senegoid](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/senegoid/32/6606_2.png) [@Senegoid](https://boards.straightdope.com/u/Senegoid)\
**Post date:** [October 17, 2017, 6:57pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/39 "2017-10-17T18:57:23Z")

</div>

Srsly, —

There are still a variety of residual buggies in the new skin, _some of which_ seem just obnoxious enough that TPTB _really_ ought to be dealing with it. But it does appear that TPTB have indeed given up on doing any more bug-fixing with the new skin, and they are not even doing us the courtesy of, at the minimum, responding to these complaints to tell us so.

These are the remaining bugs that I’m aware of that seem significant:

[ul][li] As per the topic of this thread, **code tags** don’t work.[/li][li] Also, **spoiler tags** within **quote tags** don’t work. The spoiler box is always shown open, and the “Show/Hide” button is inoperative.[/li][li] I’m still seeing banner ads after every fifth post. They are “dead” in the sense that there’s nothing active or clickable in them.[/li][li] The “New Thread” and “Reply” buttons are still totally invisible in some environments (e.g., mine). I can live with this because I know where they are located and I can still click on them, but it’s still a poor show.[/li][li] ETA: That business about sigs being displayed by default too.[/ul][/li]Any other non-trivial bugs anyone wants to mention?

I propose to expand this thread to become a compendium of still-outstanding and _non-trivial_ bugs in the new skin, the OP’s complaint included, in the hope that TPTB will at the very least have the temerity to respond, even if only to say “screw it, we’re through with this”. To that end, I am reporting this post to force it to the mods’ attention.

Reported (soon-to-be).

# /s/ **Senegoid**

---

<div class="post-metadata">

**Author:** ![gnoitall](https://avatars.discourse-cdn.com/v4/letter/g/bb73d2/32.png) [@gnoitall](https://boards.straightdope.com/u/gnoitall)\
**Post date:** [October 17, 2017, 7:10pm UTC](https://boards.straightdope.com/t/testing-code-tags/796468/40 "2017-10-17T19:10:39Z")

</div>

> [@Senegoid](#):
>
> Srsly, —
> 
> There are still a variety of residual buggies in the new skin, _some of which_ seem just obnoxious enough that TPTB _really_ ought to be dealing with it. But it does appear that TPTB have indeed given up on doing any more bug-fixing with the new skin, and they are not even doing us the courtesy of, at the minimum, responding to these complaints to tell us so.
> 
> These are the remaining bugs that I’m aware of that seem significant:
> 
> [ul][li] As per the topic of this thread, **code tags** don’t work.[/li][li] Also, **spoiler tags** within **quote tags** don’t work. The spoiler box is always shown open, and the “Show/Hide” button is inoperative.[/li][li] I’m still seeing banner ads after every fifth post. They are “dead” in the sense that there’s nothing active or clickable in them.[/li][li] The “New Thread” and “Reply” buttons are still totally invisible in some environments (e.g., mine). I can live with this because I know where they are located and I can still click on them, but it’s still a poor show.[/li][li] ETA: That business about sigs being displayed by default too.[/ul][/li]Any other non-trivial bugs anyone wants to mention?
> 
> I propose to expand this thread to become a compendium of still-outstanding and _non-trivial_ bugs in the new skin, the OP’s complaint included, in the hope that TPTB will at the very least have the temerity to respond, even if only to say “screw it, we’re through with this”. To that end, I am reporting this post to force it to the mods’ attention.
> 
> Reported (soon-to-be).
> 
> # /s/ **Senegoid**

The last word I know of from TPTB was [this comment](http://boards.straightdope.com/sdmb/showpost.php?p=20529936&postcount=563), in the old “Major [Bugs in SDMB re-skin fixed](http://boards.straightdope.com/sdmb/showthread.php?t=835598)” (:rolleyes:) thread.

> [@Major bugs in SDMB re-skin fixed. What do you think?](https://boards.straightdope.com/t/major-bugs-in-sdmb-re-skin-fixed-what-do-you-think/795663/563):
>
> We haven’t given up, but it’s fair to say fixing the remaining problems with the SultanTheme skin has taken a lower priority while we take care of other issues. One such issue is getting the ads working. I realize no one is enthusiastic about ads but they’re how we keep the lights on. We hope to get the necessary code loaded on the beta site during the week of 10/16 and will invite your feedback when we do. Thanks.

So, fixing the new skin is a low-ish priority. There was supposed to be a beta test of more fixes this week? I haven’t seen an announcement. Maybe the ads have been more intractable than anticipated. :mad:

[Previous page](https://boards.straightdope.com/t/testing-code-tags/796468.md?page=1)

[Next page](https://boards.straightdope.com/t/testing-code-tags/796468.md?page=3)
