Is there an official interface to TOrderedListEditDlg? - delphi

In an expert, I'd like to re-use the dialog that Delphi displays to edit a project's library path and for similar purposes:
I found a hack for using it (look for TOrderedListEditDlg on the page). As I think the guy who wrote the linked article knows what he does I don't have too much hope for a less hacky solution, but who knows... So: Do you know an official interface (most probably OTA) to TOrderedListEditDlg?
PS: I'm aware that it's probably trivial to recreate the whole dialog but I like consistency and the DRY principle.

You're right, I couldn't find an official way, that's the only reason I used this hack.
BTW, check out the INTAEnvironmentOptionsServices and INTAAddInOptions interfaces mentioned here. You can incorporate your configuration in Delphi's Environment Options treeview. But TOrderedListDlg still doesn't seem to be exposed officially.

Related

Private instance of pastebin like service

I work behind a very strict firewall. Any sharing of code is grounds for immediate dismissal (and aggressively enforced).
I would like to set up a pastebin-like environment for my global team.
I haven't been able to find any solutions that are able to support c#, sql, python, java, html (primarily)
Does anyone know of any solution I might be able to install on a local server to use only internally?
Thanks!
If you search the internet for "pastie like service" you can find some open source implementations.
For example, http://alternativeto.net/software/pastie/ lists quite a lot, one of them is at http://hastebin.com/ and does syntax highlighting
haste-server source code on github
haste-client source code on github
(If you need help to host such a service, let me know)

What is "/path/to"?

I've been doing web programming for some time now, and don't consider myself so much of a total newbie but I still don't understand what "/path/to" is. People use that code a lot, and I used to think it's just a way to refer to main path. But I started wondering why so many people use that syntax so uniformly, because it's confusing if it's meant to be NOT taken literally. Most people would actually type in "/path/to".
So I tried searching for "/path/to" on google, but this is something that's hard to search on a generic search engine, so no luck. So I decided to ask here. Is "/path/to" some kind of jargon that people use to refer to something? If yes, what does it exactly refer to? If no, then how does it work internally?
This is just a placeholder for an actual path in your environment. I usually use it when I want to abstract from the path in question. It does not matter and the reader/user of my code will likely have it different. So I prefer to clearly indicate what places he should amend.
Other examples of this sort:
GET http://example.com
ssh username#host
/path/to/project and similar constructs are used in documentation and blog posts to abstract away details that vary on different machines and for different people. For example, I might be working on a project on my Linux machine that is at /home/code-apprentice/src/my-cool-ruby-project. At the same time, you are working on a project on your Windows machine that you put at C:\Users\Vlad\Projects\MyEvenBetterRubyProject. We both are reading the same blog article to implement a feature. The detail of the exact path where we each store our project doesn't matter for the particular part of Ruby on Rails that we are using. The notation /path/to/project is just a convenient and concise placeholder to describe the root of the project that varies between our machines.

Would it be safe to rely on DeHL for new projects?

I've been browsing the DeHL repository on GoogleCode, and it looks really good to me.
Many interesting features that make basic programming tasks easier; Some neat things that are in the DotNet FCL, but are missing from the Delphi RTL can be found in this library;
Coded in a modern way, making good use of new language features;
Each class, record type, member function and parameter is documented in such a way that it'll show in the code completion of the Delphi IDE;
Well-organized and clean code;
Plenty of unit tests;
Open source and Free;
Basically, it looks like this library should've been included with Delphi, as part of the RTL.
One major drawback: The project has been discontinued. :-(
Now my question is:
Would it be safe to rely on this library for future projects, and use it as a base framework to build upon?
Basically I'd like to hear from somebody who's actually used this library whether or not it's worth it to invest time in getting to know this library, and why.
IIRC the project was discontinued because it was an over-engineered first attempt and a lot of its features turned out really messy and bloated. You should look at Alex Ciobanu's second attempt, which is simply called Collections. It contains most of the interesting features from DeHL, but leaner.
Be careful, though. It still makes heavy use of generics, which will make your binary size really big if you use it a lot, because the compiler team hasn't implemented a way to collapse duplicate code yet.

What is the best way of documenting f# code?

I have tried Sandcastle with the patches included with the guided GUI installation, but unless I am doing something very wrong it's basically unsuitable for documenting F# code (even if it would work really well for C#). Maybe it works for others, in which case I would be very grateful for a short complete example that I could start from. Many thanks.
I am aware of Sandcastle doesn't output everything from a F# assembly , but the project referenced there does not yet appear ready for prime time.
There must surely be something that works reliably and is "good enough"? Many thanks for any suggestions.
Edit: Many thanks to everyone who replied. Brian's answer was closest to what I wanted, so I will accept it. However, the outcome is that there does not appear to be a solution that is both suited to F# and that works reliably. I will stick with textual comments for now.
I expect FsHtmlDoc.exe will start to work at some point. While I cannot rule out that it works already and I just did not use it correctly, googling it suggests I am not the only one to find it is not yet perfect.
I know next to nothing about Sandcastle, but note that like C#, in F# you can use triple-slash comments, and they will be output in the XML documentation file that the compiler outputs (in VS, on the project properties page, build tab, check the 'Xml documentation file' checkbox; on the command line, use the --doc argument to fsc.exe.)
Also, see FsHtmlDoc.exe in the PowerPack.
You could also look at Focco
It produces a nice html based documentation. See here for an example:
You could also check out ApiStack from IntelliFactory. I realize Focco requires a very different approach if you already have a lot of standard XML doc comments.
I haven't used it, but it might be worth giving docu a try...

Great Delphi source code to read and learn from

This question relates to
https://stackoverflow.com/questions/9603/what-is-some-great-source-code-to-read
which compiles a list of great (in the sense of readable, elegant, ...) source code.
Part of the learning experience when reading source code is certainly independent of the language but every language has its own ways to do certain things. So in this question, I'm looking for great Delphi code.
What is some great Delphi source code to read and learn from? Any suggestions?
The VCL/RTL itself is a very good example of great delphi code. It is available at your delphi installation folder ($delphi)\source, except for the new Starter edition, which I heard does not include the source code.
My suggestions
All the Jedi projects are very well written JCL (Jedi code library), JVCL, JEDI Windows API Library (Great to learn abot windows api and header conversions).
VCL and RTL Source code.
Virtual Tree View
Well for once, if you ask me, the VCL is fairly well written, and you can learn quite a bit about the Windows API from it.
Then there is the much hyped Delphi Web Script, which sounds rather interesting.
I would also recommend DEHL, which is quite a nice library, and the VirtualStringGrid, as a hugely popular and quite well written, though complex, component.
Then there is the JCL and JVCL, that I would also recommend.
The GExperts sourcecode on sourceforge.
Obvious answer: My sources
http://svn.berlios.de/viewvc/dzchart/utilities/Delphi7Help4Bds/trunk/
http://svn.berlios.de/viewvc/dzchart/utilities/dzAutoSave/trunk/
http://svn.berlios.de/viewvc/dzchart/utilities/dzCmdLineParser/trunk/
http://svn.berlios.de/viewvc/dzchart/utilities/dzLib/trunk/
http://svn.berlios.de/viewvc/dzchart/utilities/dzPrepBuild/trunk/
You saw that coming, didn't you?
Bold for Delphi - Framework, a masterpiece, huge and immaculately designed
StarUML - An UML Editor, wonderful clean design and code
Clever Internet Suite - Communication component set - clean architecture and code, commercial
"Good code" is a rather subjective topic ... everyone has an opinion on what can be considered good/bad code. Readable code might not necessarily be considered effective code, and vice-versa.
If your interest is learning how to create well-written code, you should instead study any code and find out how to improve or fix it. When I was in the Air Force, part of the training I would give my new troops would include them visiting sites like Koders or Sourceforge, where they would download source and analyze for functionality, effective results, coding standards, proper software engineering principles, etc. They would look at the code and answer "how would I do this differently?" This exercise gave them a much better understanding of what well-written code should look like.
My point is, you can't learn how to write "good code" if you don't know what "bad code" looks like.

Resources