7 Replies - 1640 Views - Last Post: 10 January 2011 - 07:04 PM

#1 Jack Eagles1  Icon User is offline

  • Pugnacious Penguin (inspired by no2pencil)
  • member icon

Reputation: 183
  • View blog
  • Posts: 1,152
  • Joined: 10-December 08

Should I write a program for DIC code tags?

Posted 09 January 2011 - 03:30 PM

Okey, so I was bored today, and came up with an idea.

I'm personally pretty sick of asking people to enclose their code in tags, so I thought up a simple way to make sure that A user adds code tags to their code. I plan to write a simple program in VB.NET which will rely on the following principles:

1: Most users use browsers which display the page title of the selected webpage
2: Most users will not write code on the webpage, they will copy it into the textbox for the post body, from a development program.


What I plan to do is write a program which monitors window titles(say every 500ms), and if the title of the selected window text contains "Posting New Topic - Dream.In.Code", then the program will read the data on the clipboard, and if the data on the clipboard ends with/starts with certain keywords (such as "Private Sub" to start with, or "End Sub" to finish with), then the program will automatically add the text "[.code]" and "[./code]" (without the "."s) to the start and end of the text, assuming that the user is going to copy the text into the topic body textbox. When the user does copy the text into the text/body textbox, then it will already have the code tags inserted.


What do you guys think of my idea/do you have any ideas for improvements on it?

This post has been edited by Jack Eagles1: 09 January 2011 - 03:31 PM


Is This A Good Question/Topic? 0
  • +

Replies To: Should I write a program for DIC code tags?

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6035
  • View blog
  • Posts: 23,417
  • Joined: 23-August 08

Re: Should I write a program for DIC code tags?

Posted 09 January 2011 - 03:46 PM

Automatically inserting code tags is, I think, problematic and may lead to even more cleanup. However, if you could send a shock through the Internet and zap the bastards when they forget the tags, I'd be all for it. Of course some sort of dialog to tell them WHY we're shocking them is probably necessary, but that's feature creep. :D
Was This Post Helpful? 3
  • +
  • -

#3 Jack Eagles1  Icon User is offline

  • Pugnacious Penguin (inspired by no2pencil)
  • member icon

Reputation: 183
  • View blog
  • Posts: 1,152
  • Joined: 10-December 08

Re: Should I write a program for DIC code tags?

Posted 09 January 2011 - 03:50 PM

How about a feature which sends a Javascript alert to anyone posting (in programming forums) with under 10 posts or something?
Was This Post Helpful? 0
  • +
  • -

#4 cfoley  Icon User is offline

  • Cabbage
  • member icon

Reputation: 1939
  • View blog
  • Posts: 4,027
  • Joined: 11-December 07

Re: Should I write a program for DIC code tags?

Posted 09 January 2011 - 05:00 PM

You could always just ignore posts and threads you don't like. It's not as if it's your personal mission to ask everyone to use code tags.
Was This Post Helpful? 0
  • +
  • -

#5 AdamSpeight2008  Icon User is offline

  • MrCupOfT
  • member icon


Reputation: 2240
  • View blog
  • Posts: 9,410
  • Joined: 29-May 08

Re: Should I write a program for DIC code tags?

Posted 09 January 2011 - 05:34 PM

Console.WriteLine("
")
[/code]
Code Tag Fail?

Write a extension for vs studio that copy the code to the clipboard, tags included.

This post has been edited by AdamSpeight2008: 09 January 2011 - 05:32 PM

Was This Post Helpful? 1
  • +
  • -

#6 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6035
  • View blog
  • Posts: 23,417
  • Joined: 23-August 08

Re: Should I write a program for DIC code tags?

Posted 09 January 2011 - 05:50 PM

I'm going to go out on a limb here and say perhaps the first IDE needing such a plugin is Turbo C/C++.
Was This Post Helpful? 1
  • +
  • -

#7 Curtis Rutland  Icon User is online

  • (╯□)╯︵ (~ .o.)~
  • member icon


Reputation: 4425
  • View blog
  • Posts: 7,694
  • Joined: 08-June 10

Re: Should I write a program for DIC code tags?

Posted 10 January 2011 - 01:38 PM

Fuck me, is Turbo C++ still out there? That was the IDE I used in high school in my first programming class. The DOS version. I remember liking that one better because it was easier to break from infinite loops.
Was This Post Helpful? 0
  • +
  • -

#8 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6035
  • View blog
  • Posts: 23,417
  • Joined: 23-August 08

Re: Should I write a program for DIC code tags?

Posted 10 January 2011 - 07:04 PM

Yep, it appears to be the official C/C++ IDE of India, and other "developing nations". It's the scourge of the C/C++ forum...come hang out more and watch all the copy & paste code with BGI graphics and one-letter variables.

For example, this just came in.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1