IDE: Tips of the Day lazarus / 13-General ---------------------------------------------------------------------- x2nie · 2014-05-17 06:32 Lazarus contains many hidden gems (to avoid saying Lazarus is mysterious ). If you are Lazarus beginner, you wouldn't read tons of codes because you don't know from where you will start. Sometime it's gems appear only after you ask to forum how to do things. Another method, you are lucky if can learn deep more in wiki only if found a correct keyword. Maybe the fastest way to get attention is broadcasting your question in mail-list ?, but that last process will only disturbing of experts conversation rather than help them developing better Lazarus. You might describe your self as a Lazarus expert after few days trying. Nice. Lazarus was not too hard to understand, though Lazarus is complex yet ... So, are you sure you really know if there was a new hidden gem plugged in Lazarus ? Every week, anytime, a new feature introduced, a new bug found and being fixed. Some way of how to do thing then gonna more easier, and there are some tricks which are the gems of Lazarus that are may be not yet unveiled by you. While those hidden gems are waiting to be found, we are looking for them. This forum, wiki, mail-list, bug-tracker, online-help and another social-media are like market-place in my perspective. Places of barter between the tricks of unveiling one gem with another gems of Lazarus for better knowledge of it. Thanks for technologies behind that, that make this mutual activities happen. And we know, of course there is nothing wrong with the activities above. ----------- But, IMHO, we need "robot" to accelerate those processes. We need to keep all gems in the way everybody can access them anytime even when they couldn't yet imagine (like the beginner doesn't have idea if there was simpler way to do things). We need a clean place to distinct between needle and the hay. Imagine when You are noticed with an unveiling of hidden potential of your IDE.. Automatically... Every day.. and more tricks when you demand more.. This will give you a new point of few about how powerful you weapon, This will teach you in your own room, even new think before you can imagine of that new lesson. This robot wouldn't disturb the expert conversation by your stupid question. This robot will accelerate your learning-curve if you are beginner This robot will improve your control to Lazarus if you were expert. This robot will be a Table of Content, a gate to the hidden gems of collective Lazarus knowledgebase. This robot will be "Tips of the Day" popbox in our beloved IDE Lazarus. Open your mind What do you think ? ---------------------------------------------------------------------- x2nie · 2014-05-17 07:01 ... (this post will be a container of latest progress of this topic. dowload link etc will be updated here.) Prototype project: http://www.codeproject.com/Articles/7424/XHTMLTipOfTheDay-HTML-Tip-of- the-Day-Dialog Content  Ideas: Quote from: Martin_fr on May 17, 2014, 03:21:37 pmAs for the tips:- cross widget: See http://forum.lazarus.freepascal.org/index.php/topic, 24578.msg148113.html#msg148113 Then of course "Config and Target" could be a tip of the dayThings that should be in the tip of the day could come from - Our FAQ - The webpage ( http://www.lazarus.freepascal.org/ ) tip of the day - http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools - http://wiki.lazarus.freepascal.org/New_IDE_features_since - but of course there can be more In any case, the very first tip, after a new installation (not update / new install) that everyone would have to get is: "Did you know the size of your apps executable differs for debug and release builds. Learn here how to build a release with a smaller executable ...."Quote from: eny on May 17, 2014, 03:51:37 pmAnd a close second: use @ when assigning values to procedural variables (FSomeEvent := @EventProcedure; ) ---------------------------------------------------------------------- eny · 2014-05-17 07:18 Another blog? ---------------------------------------------------------------------- typo · 2014-05-17 07:41 Well, I like it. Let's know whether the team will want to keep something like that updated, because it crucially depends on be updated. ---------------------------------------------------------------------- x2nie · 2014-05-17 08:25 Quote from: eny on May 17, 2014, 09:18:16 amAnother blog? I refer to a dialogbox appears when we start Lazarus (but not yet developed) rather than a website. It usually start with a text: "Do you know ...?" plus a paragraph that describe the topic. plus an picture / animated gif would be better. in the end of paragraph, could be a link of "read more..". The face of "Tips of the day" is possibly like this: https://www.google.com/search?q=tips+of+the+day&tbm=isch A dedicated blog that contains all Tips of the day would be also great, you know that. Anyway, I imagine it would be right here, inside Lazarus IDE. Without require to open any external webbrowser. Just open lazarus, and a dialog box of a tip will appear after splash-screen closed. It is possibly become an RSS-reader client, if user allow to fetch RSS from such Lazarus site or from (your option) a dedicated blog. User can control whether allowed/disalow to check newer RSS feed. So, for example, Lazarus user will be noticed if new Lazarus release available. Or, if a new programming contest yet began. Or any possible important info for Lazarus / FreePascal community. But, IMHO the main goal is skill upgrading of Lazarus's user by knowing better of this IDE. Imagine that we only need to spend 1 minute everyday, to upgrade our skill Why 1 minute? because people are also busy doing their another task. What if people need more tricks ? There will be "Next tip" button in the dialog box. ------------------- Q: How it will work ? A: New Lazarus installation will be shipped with this feature enabled. Q: What if people felt as being disturbed with this dialog box? It might annoyed for the first insight, right? A: I dont know what people will feel when it was available. But, They can disabled anytime they face this by uncheck an "Don't show this dialog again" checkbox. Q: What if an user want to show Tips of the Day again after she was disabling it ? A: In IDE menu, click Help -> Tips of the Day Q: Is this feature will be a revolution feature of Lazarus? A: Maybe not. It just another way to help people without requires the availability of another people. Q: What is the advantage of this feature ? A: In online mode, you get news / announcement (solution) from community; not questions.     In offline mode, you got a quick overview around of  hidden potential of Lazarus IDE. Q: What is disadvantage of this feature ? A: It might need database to store each items, it might require a webbrowser that possibly doesn't supported by all widgetset. I don't know for sure, we are in early stage of development, even we are in investigation stage. Q: What is required to realize it? how long? A: I think let people think first, whether this idea is promising for them (community). If this feature is not useful for all people, we can make it as optional package (LPK) so, someone who need it can install the package by them self. Otherwise, it will be installed as default Lazarus distribution. Quote from: typo on May 17, 2014, 09:41:23 am Well, I like it. Let's know whether the team will want to keep something like that updated, because it crucially depends on be updated.   Currently, there was an "Topic of the Day" available in Lazarus's front page (website). I think better if we could fetch that as RSS and show up inside Lazarus IDE. If not allowed as realtime, user might click "update tips" manually by clicking somewher in IDE's menu. ---------------------------------------------------------------------- eny · 2014-05-17 08:44 Everybody has his/her own way of working. I don't want the IDE to jump through hoops, I want it to be a reliable development environment (which for the record it is on Windows) without getting distracted by bells and whistles. Tips and tricks that work for one user, do not work for other users. Especially experienced users. For example I never liked the code completion feature. It interrupts my thought process and I'm a fast typist anyway. Personally when I get annoyed by some specific limitation I start searching for a solution (e.g.  project templates). If someone already found/created a solution for it: great! Even greater when I can find it in the Wiki. A tip of the day pop up would be a nice feature, as long as I can turn it off the very first time and it does not come back, and if the information is also in the Wiki where it can be found easily. Just my 3 cents. (inflation correction applied) ---------------------------------------------------------------------- x2nie · 2014-05-17 09:49 Quote from: eny on May 17, 2014, 10:44:50 amA tip of the day pop up would be a nice feature, as long as I can turn it off the very first time and it does not come back, and if the information is also in the Wiki where it can be found easily.Just my 3 cents.(inflation correction applied) 3 cents USD is about Rp.341 IDR, I could bought a cheap candy with it. Thanks you for the rank  ...  ( just kidding ! ). ------------------------ I can understand if someone play with Lazarus as-is and felt comfort with default setting. It is a prove that Lazarus is well designed. For other, there are people that curios about hidden gems of Lazarus IDE. for example: where I can found the idea of using Ctrl+Shift+F1 shortcut ? I can not find anywhere inside Lazarus. (+F1 not +F11) It is one of amazing Lazarus building block: showing structure of current window/dialog/form's object hierarchy = Shift+Ctrl+F1 Answer: in Lazarus Forum! While this amazing feature couldn't be found inside IDE, it will be forgotten; or even worst will be unknown by potential user who need it. Assumption: if something visible will be ignored, what would be the hidden one? My idea is to collect any good experience for beginner/learner from expert/experienced user. Forum, mailist, bugtracker, all is good. Minus, there were information mixed between quick tricks and various (discussion) posts. ------------------------ Anyway, Eny give us another perspective: * A dedicated website is another possible alternative. And better if that website is a collaborative work. I mean: anybody can submit their experience as a "Tip of the Day", plus attach file. Hey, wiki is designed for this need, right ? What do you think? ---------------------------------------------------------------------- JuhaManninen · 2014-05-17 10:03 I think you are wasting your time with a "Tip of the Day" dialog. A programming environment and IDE are complex systems, you must know many things to be fluent with them. Thus there must be good documentation and the user interfaces must be as intuitive as possible. Do you really think people would learn things by clicking a "Next Tip" button BEFORE Lazarus opens? If you really want a "Tip of the Day" dialog, you can make a patch and I believe it will be accepted. Yet, there are much more important things to improve both in IDE and in documentation. The "Additions and Overrides" GUI is a good example. It is new in Lazarus 1.2 and not yet perfect. BTW, you can also improve the main web page by sending patches. About finding hidden gems in new Lazarus development, I recommend reading the SVN commit history. It reveals for example that Martin and Joost are making a new Pascal debugger. We can get rid of GDB and its associated problems in future. IMO the best tool for reading the commit history is gitk. There is a git mirror repo available. ---------------------------------------------------------------------- x2nie · 2014-05-17 11:18 Quote from: JuhaManninen on May 17, 2014, 12:03:45 pmBTW, you can also improve the main web page by sending patches.1) I don't know if I can send a patch of main web-page. Where is the repo of mainpage? 2) I've bad experience of first sending patch to bugtracker. and I stop sending. There was a long discussion that forcing me to send patch, and when I've done with that no follow up, no comment nothing. I just annoyed with HOW TO do that in proper way. Whats wrong with my patch? Quote from: JuhaManninen on May 17, 2014, 12:03:45 pmAbout finding hidden gems in new Lazarus development, I recommend reading the SVN commit history. We forgot one thing JuhaManninen, accelerating user's learing curve. Your recommendation is seem under assumption of ideal condition: users are above average, they are experienced users. That is optimistic perspective. While my point of view is the opposite: users are below average, they need: well grained things, any easy step to follow, for improving their skill. This way is skeptic perspective. Maybe this assumption is based my prior job that was a teacher. But the idea to collect "Tips of the Day" would benefit entire Lazarus/FreePascal community, if it was well organized (categorized, distinct newbie & expert tags). So, give me time to rethinking. ---------------------------------------------------------------------- JuhaManninen · 2014-05-17 12:46 Quote from: x2nie on May 17, 2014, 01:18:08 pm1) I don't know if I can send a patch of main web-page. Where is the repo of mainpage?  http://wiki.freepascal.org/WebPageDevelopment Quote2) I've bad experience of first sending patch to bugtracker. and I stop sending. There was a long discussion that forcing me to send patch, and when I've done with that no follow up, no comment nothing. I just annoyed with HOW TO do that in proper way. Whats wrong with my patch? Yes, ignoring a patch is bad. Martin has studied and discussed about it. Maybe he can either accept or reject it. QuoteBut the idea to collect "Tips of the Day" would benefit entire Lazarus/FreePascal community, if it was well organized (categorized, distinct newbie & expert tags). It is OK if you want to implement it, although it competes with the existing "Tip of the Day" feature of the web page. ---------------------------------------------------------------------- Martin_fr · 2014-05-17 13:04 About the patch: I said on the forum: "I was not convinced that the component palette should be vertical center aligned. I would not accept it, but I would not veto acceptance by anyone else". So, if any other developer (Juha, whats your opinion)  thinks it should be, then ok. Note, that this means: - vertical centered, while all icons, fit on one line - changing to vertical top align, if icons wrap over 2 lines  For discussion on this, it would be best to continue the original thread. http://forum.lazarus.freepascal.org/index.php/topic,24387.msg146712.ht ml ---------------------------------------------------------------------- Martin_fr · 2014-05-17 13:21 About the tip of the day. (build in tip of the day): Yes absolutely. About the tips proposed here so far: Definitely not. Automatic update notifications are a different topic. They do not belong here. Open a thread of its own, if interested in discussing it. ---------------- A tip of the day would be a good thing. It has to be a package though. And optional (can be switched off, without unistalling the package) It can be installed and on by default. But as it stands today, it seems it needs someone to contribute it. ---------------- As for the tips: - cross widget: See http://forum.lazarus.freepascal.org/index.php/topi c,24578.msg148113.html#msg148113 Then of course "Config and Target" could be a tip of the day -Shift Ctrl F1: When/How do you need it? Are you contributing to the help content? This feature is for people who add content to the help. It is not meant for other usage. Hence it is hidden. (intentionally hidden) Things that should be in the tip of the day could come from - Our FAQ - The webpage ( http://www.lazarus.freepascal.org/ ) tip of the day - http://wiki.lazarus.freepascal.org/Lazarus_IDE_Tools - http://wiki.lazarus.freepascal.org/New_IDE_features_since - but of course there can be more [ Btw the above shows, that there are already lists of tips ] In any case, the very first tip, after a new installation (not update / new install) that everyone would have to get is: "Did you know the size of your apps executable differs for debug and release builds. Learn here how to build a release with a smaller executable ...." ---------------------------------------------------------------------- eny · 2014-05-17 13:51 Quote from: Martin_fr on May 17, 2014, 03:21:37 pmIn any case, the very first tip, after a new installation (not update / new install) that everyone would have to get is: "Did you know the size of your apps executable differs for debug and release builds. Learn here how to build a release with a smaller executable ...." And a close second: use @ when assigning values to procedural variables (FSomeEvent := @EventProcedure; ) ---------------------------------------------------------------------- Martin_fr · 2014-05-17 14:09 Quote from: eny on May 17, 2014, 03:51:37 pmAnd a close second: use @ when assigning values to procedural variables (FSomeEvent := @EventProcedure; )  Maybe. But it would be good/better, to have that as a "quick fix" when getting a compiler error. And to make quick fix more visible, by adding a symbol to the message, that says "fix". --- Or even display an error (red ziczac) while you type, and offer a hint ---------------------------------------------------------------------- x2nie · 2014-05-17 14:54 Quote from: Martin_fr on May 17, 2014, 03:21:37 pmAbout the tip of the day. (build in tip of the day): Yes absolutely. About the tips proposed here so far: Definitely not. It confused me. Quote from: JuhaManninen on May 17, 2014, 02:46:02 pmQuote from: x2nie on May 17, 2014, 01:18:08 pm But the idea to collect "Tips of the Day" would benefit entire Lazarus/FreePascal community, if it was well organized (categorized, distinct newbie & expert tags). It is OK if you want to implement it, although it competes with the existing "Tip of the Day" feature of the web page. It wouldn't "competes", Juha. Even it seem will be mutual to have Tip of the Day for both web-page and inside IDE. Possibly, this two will have single source of items (tips) via RSS, Ajax, whatever, if possible. Quote from: Martin_fr on May 17, 2014, 03:21:37 pm A tip of the day would be a good thing. It has to be a package though. And optional (can be switched off, without unistalling the package) It can be installed and on by default. But as it stands today, it seems it needs someone to contribute it. You said that, Martin. Thanks you. I hope it will be integrated within IDE soon or later. Okay guys, it seem it is more promising now. (Martin is a member of Lazarus Team). I will get a chance to realize "Tips of the day" in a package plus a demo application . Perhaps, this will also useful for other application outside the IDE project, too. For first prototype, it would be: * shows after splash-screen hides * provides a "Never show tips at startup" inside the dialog. Using a checkbox or combobox. * a close button. * "next tip" button * "read more.." link to web page. Using TLabel ? * Description/the-tips paragraph using TLabel. Tips's source: AFAIK the best we can provide is HTML based (*.htm), as this standard is well known format. Because it allow attaching picture / screenshot / animated gif of how the tips works. Alternatively is Mark-down hyper text (*.md) which is easier to edit. But for this early stage, we can use plain text (*.txt). That doesn't require any parse to display the contents. My furthest plan is to fetch RSS/HTML online; which is might not set the default behavior of Tips of the Day. ------------- Well, I have question: What do you expect as container of the tips? A. TLabel or TMemo B. TRichEdit C. TWebBrowser (embeded). E. anything else: ..... please tell the component's class name. ---------------------------------------------------------------------- Blaazen · 2014-05-17 15:04 Quote* "read more.." link to web page. Using TLabel ?See Lazarus: Help -> About Lazarus -> tab About , there are two labels used as links. QuoteWhat do you expect as container of the tips?Textfile. ---------------------------------------------------------------------- Martin_fr · 2014-05-17 17:06 Quote from: x2nie on May 17, 2014, 04:54:35 pm Quote from: Martin_fr on May 17, 2014, 03:21:37 pm A tip of the day would be a good thing. It has to be a package though. And optional (can be switched off, without unistalling the package) It can be installed and on by default. But as it stands today, it seems it needs someone to contribute it. You said that, Martin. Thanks you. I hope it will be integrated within IDE soon or later. If a contribution is made... (This may include the contribution being adapted to some requests, how to implement some details. / Not going to be picky, don't worry, but maintaining some standard.) QuoteOkay guys, it seem it is more promising now. (Martin is a member of Lazarus Team). So is Juha. (and a few others on the forum) QuoteI will get a chance to realize "Tips of the day" in a package plus a demo application . Perhaps, this will also useful for other application outside the IDE project, too. For first prototype, it would be: * shows after splash-screen hides Imho, it should wait until the IDE  has opened all windows (that is as soon as main-ide bar, src edit, messages window are there. So people already see the IDE, and know they are there. Otherwise it would be a lonely window, like the setup screen Code: [Select]lazarus.exe --setupQuote* provides a "Never show tips at startup" inside the dialog. Using a checkbox or combobox. Very good Quote* a close button. * "next tip" button * "read more.." link to web page. Using TLabel ? Keep the options open, maybe there will be a tips_of_day.chm help file one day. QuoteTips's source: AFAIK the best we can provide is HTML based (*.htm), as this standard is well known format. Because it allow attaching picture / screenshot / animated gif of how the tips works. If you implement it, then that is your decision. I think TurboPowerIPro works well. Please note, that by default the tips  database comes with the installer. Downloading new tips (based on IDE version) can be added as option, but should not happen without user consent. The tips must be organised in a reasonable way (also SVN friendly). First thought would be one file, and images should go into a folder. (and should not be too many large images, I hope to one day reduce the size of the installer, not the opposite) I would not think of 1 file (text) per tip being a good solution. Though that can be argued. XML format is possible. Maybe fpdoc can be used? Then there was an editor already. Quote Alternatively is Mark-down hyper text (*.md) which is easier to edit. But for this early stage, we can use plain text (*.txt). That doesn't require any parse to display the contents. My furthest plan is to fetch RSS/HTML online; which is might not set the default behavior of Tips of the Day. ------------- Well, I have question: What do you expect as container of the tips? A. TLabel or TMemo B. TRichEdit C. TWebBrowser (embeded). E. anything else: ..... please tell the component's class name.[/font] Not TWebBrowser. Also there will be individual controls for header and content. Look at TurboPowerIPro ---------------------------------------------------------------------- Blaazen · 2014-05-17 17:20 I meant this: tips must be managed somehow and also translated. It would be nice to have them i array but AFAIK resourcestrings cannot be arrays. So my idea is to have textfiles like tips.txt.en, tips.txt.de etc. Each line is one tip. I hope there exists tools to easy translation of plain (UTF8) text files. ---------------------------------------------------------------------- Martin_fr · 2014-05-17 17:57 Quote from: Blaazen on May 17, 2014, 07:20:53 pmI meant this: tips must be managed somehow and also translated. It would be nice to have them i array but AFAIK resourcestrings cannot be arrays. So my idea is to have textfiles like tips.txt.en, tips.txt.de etc. Each line is one tip. I hope there exists tools to easy translation of plain (UTF8) text files. Good to mention that. But if you just have one file per language, then outdated translations are not detected. It will be a minor issue if a tip is simply not available in one language, but tips may have been changed, as the IDE may have been changed. Then translations show an outdated tip. resource strings have an ID. If a resource string has such big changes, the name of it should change, and therefore all translations will be missing, but none will be outdated. But resource strings do not work well here. Yet we can take the idea of an ID. Each entry in the master file (linebased, xml, or fpdoc) should have an ID. Translation files have the same ID. So tips can be searched. BTW line based is imho not suitable, a tip consists of at least - an id - a header - a body (may contain image-refs, links,... ) may be very long, and on its own hard to read on one line. - one (or more) reference to a "read more" (http / chm / ...) optional - group tags, such as beginner, expert. Or Designer, Editor, Debugger, ... ---------------------------------------------------------------------- Blaazen · 2014-05-17 18:04 Yes, it's not so simple after all. ---------------------------------------------------------------------- Martin_fr · 2014-05-17 18:15 Well yes. It must be thought of. Same issue exists for the chm help. Only afaik no one translated that yet? Or fpdoc, and even help hint, that are from comment in source code? But of course that does not mean we should ignore it when creating something new. Yet my approach here would be to say, I do not want to burden that entirely on a contributor, if someone wants to contribute it. I would accept a contribution, that *can* be extended, based on the way it is designed. For example an xml based, or paragraph based, or ini file format, that includes the concept of an translation ID [1] Writing a tool, that then generates stub for translations, and/or removes no longer existing entries, is not a condition for acceptance. (It be nice if it was supplied / but if not, I'd still accept the contribution). [1] A translation ID is supposed to change, if the content changed, because the old content was no longer valid. This may differ from an ID, used to store "tip was already displayed". The latter may not change.