Recent

Author Topic: I have written an e-book for beginners!  (Read 21330 times)

nsunny

  • Full Member
  • ***
  • Posts: 117
  • Code is magic
    • LazPlanet
I have written an e-book for beginners!
« on: December 15, 2017, 08:51:35 pm »
Hello everyone!
Happy Holidays. :)

I have written an e-book on Lazarus. This is for absolute beginners. I have tried to keep it as friendly and short as I could. Has only 10 chapters and should have anyone up and running in no time. Has helpful graphics to make things easier.

PDF Download: https://github.com/adnan360/lazarus-beginners-guide/releases/download/v1.0.0/lazarus-beginners-guide.pdf
GitHub: https://github.com/adnan360/lazarus-beginners-guide
Related Post: http://lazplanet.blogspot.com/2017/12/supercharge-your-beginner-friends-with.html

The e-book is licensed CC BY 4.0 so you can remix and release your own versions if you want. Even use in commercial purpose. You can find the source files on github link. I also have a plan to write a longer book in future going into further details. I am not an expert in Lazarus, but I want to do something for this amazing IDE.

Have fun sharing!
Lazarus TTS Tutorial | LazPlanet
Lazarus 2.2.0 | FPC 3.2.2 | Linux/OpenBSD/ReactOS

BlueIcaro

  • Hero Member
  • *****
  • Posts: 792
    • Blog personal
Re: I have written an e-book for beginners!
« Reply #1 on: December 15, 2017, 09:56:55 pm »
Great job!
Thanks for share it!
One sugestion,  I did a fast read, In charpet 9. you talk about sharing your project. You say that you can delete some files. I'm not a lazarus/pascal programmer expert  but I think you can use publish project in the project menu to do the same task.
http://wiki.freepascal.org/IDE_Window:_Publish_Project_Package

/BlueIcaro
« Last Edit: December 15, 2017, 10:04:03 pm by BlueIcaro »

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: I have written an e-book for beginners!
« Reply #2 on: December 16, 2017, 03:33:13 am »
@nsunny

Thank you for writing the guide. Wow, I really can see your efforts to make it easy to follow. It has pictures, screenshots and clear instructions.

You should consider to write for more different topics. And thank you for the LazPlanet, which I often recommend for beginners.
 ;D

ccrause

  • Hero Member
  • *****
  • Posts: 845
Re: I have written an e-book for beginners!
« Reply #3 on: December 16, 2017, 07:09:33 am »
Well done, an easy read.

nsunny

  • Full Member
  • ***
  • Posts: 117
  • Code is magic
    • LazPlanet
Re: I have written an e-book for beginners!
« Reply #4 on: December 16, 2017, 03:28:02 pm »
One sugestion,  I did a fast read, In charpet 9. you talk about sharing your project. You say that you can delete some files. I'm not a lazarus/pascal programmer expert  but I think you can use publish project in the project menu to do the same task.
http://wiki.freepascal.org/IDE_Window:_Publish_Project_Package

/BlueIcaro
Thanks for pointing that out.
I think last time I tried File - Clean Directory but it did not work for me for some reason (left out some files). I totally missed the Publish project feature. If it works, that would be better and easier option to include. I will surely look into this and if works would put into next edition.
Lazarus TTS Tutorial | LazPlanet
Lazarus 2.2.0 | FPC 3.2.2 | Linux/OpenBSD/ReactOS

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: I have written an e-book for beginners!
« Reply #5 on: December 16, 2017, 06:24:53 pm »
If it works, that would be better and easier option to include. I will surely look into this and if works would put into next edition.
For sure it works  :) Been using that since ages and is also the recommended way of 'publishing' your project f.e. in order to attach it to a forum post.

In case you add it to your book (thanks for that btw) then make sure to handle the publish directory option carefully. The default directory is a bit awkward. There are some 'macro's that can be used in the directory name.

nsunny

  • Full Member
  • ***
  • Posts: 117
  • Code is magic
    • LazPlanet
Re: I have written an e-book for beginners!
« Reply #6 on: December 17, 2017, 07:43:55 pm »
@molly
I have tried the Publish Project option. I just created a new project, hit run, brought up the dialog, selected a new directory, and submitted. From 2 folders and 8 files, it made it 4 files in the target folder: lpi, lpr, frm, pas.
I was happy with the result, then promptly found out that the icon vanished! Even not visible on titlebar of my form when I run it.

Maybe I would need to read about this feature. Do you have any suggestions if I can fix this somehow, with less change of the default values?
Lazarus TTS Tutorial | LazPlanet
Lazarus 2.2.0 | FPC 3.2.2 | Linux/OpenBSD/ReactOS

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: I have written an e-book for beginners!
« Reply #7 on: December 17, 2017, 07:54:16 pm »
Aboutth emissing icon.

I'm doing this from memory (no lazarus around atm), so please don't shoot me when wrong. Afaik you are able to configure the file extensions that should be published. I take it that the icon file is not considered important enough to publish (by default). The fact is it is not important, as your project will compile perfectly ok without it. Unless of course your aim is to also 'pass along' the icon.
« Last Edit: December 17, 2017, 07:57:44 pm by molly »

wp

  • Hero Member
  • *****
  • Posts: 11857
Re: I have written an e-book for beginners!
« Reply #8 on: December 17, 2017, 08:05:15 pm »
Yes, add the extension ico to the "include filter". Add also the extension res if you changed anything in "Project options" > "Version info".

But be aware: If you plan to upload a project to the forum or bug tracker you should NOT include ico and res because they are not needed to demonstrate an issue and would only blow up the upload size.

nsunny

  • Full Member
  • ***
  • Posts: 117
  • Code is magic
    • LazPlanet
Re: I have written an e-book for beginners!
« Reply #9 on: December 17, 2017, 08:07:45 pm »
It is from memory, so please don't shoot me when wrong.
No problem. I won't blame you. :) I just need to know more. I tried to be sure if I am going in the right way.

...I take it that the icon file is not considered important enough to publish (by default).
Hmm... I agree, it is a strange default. I think I would need to try for a while. I also did not find any useful documentation on it. Just these:
http://wiki.lazarus.freepascal.org/IDE_Window:_Publish_Project_Package
http://wiki.freepascal.org/Lazarus_IDE_Tools#Publish_Project

These seem not so much helpful for me. I guess I'll have to use trial and error to find out.
Lazarus TTS Tutorial | LazPlanet
Lazarus 2.2.0 | FPC 3.2.2 | Linux/OpenBSD/ReactOS

nsunny

  • Full Member
  • ***
  • Posts: 117
  • Code is magic
    • LazPlanet
Re: I have written an e-book for beginners!
« Reply #10 on: December 17, 2017, 08:16:33 pm »
Yes, add the extension ico to the "include filter". Add also the extension res if you changed anything in "Project options" > "Version info".

But be aware: If you plan to upload a project to the forum or bug tracker you should NOT include ico and res because they are not needed to demonstrate an issue and would only blow up the upload size.
Thanks for the info.
It seems a bit odd. Bug tracker should not be the only purpose people will use this feature. Shouldn't there be an option to include the ico and res files? Should users type them everytime when Cleaning or Publishing the project? You and I can add them, no problem. But what about newbies? They will have to remember these extensions.

This can be even devastating for a normal user. Suppose they ran Clean Project and forgot to add ico and res file extensions. Then they would loose their icon and resource files.

It would be better if we had a checkbox (or a button) which included these for us.
Lazarus TTS Tutorial | LazPlanet
Lazarus 2.2.0 | FPC 3.2.2 | Linux/OpenBSD/ReactOS

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: I have written an e-book for beginners!
« Reply #11 on: December 17, 2017, 08:22:50 pm »
@wp:
Thank you !

@nsunny:
Yes, you bring up some valid points.

The 'usual' way (if one can speak bout something being usual with regards to lazarus) is to have the options for multiple configurations (just like you are to do for example for compiling your project as debug or release).

There are so many things with regards to lazarus that requires attention, and quite honestly afaik you are the first person to express your concerns. I don't know if it would be worth a feature request....

nsunny

  • Full Member
  • ***
  • Posts: 117
  • Code is magic
    • LazPlanet
Re: I have written an e-book for beginners!
« Reply #12 on: December 17, 2017, 08:55:40 pm »
@molly
...The 'usual' way (if one can speak bout something being usual with regards to lazarus) is to have the options for multiple configurations (just like you are to do for example for compiling your project as debug or release).

There are so many things with regards to lazarus that requires attention, and quite honestly afaik you are the first person to express your concerns. I don't know if it would be worth a feature request....
Thanks for agreeing. Some changes would be nice for newbies.
I also talked about changes in the splash screen and the website (many days ago). Sometimes the community shows less interest in some things. I had wonderful time designing the Lazarus website and got help from the community as well. but never got time to spend or present more positive thoughts for the splash screen myself. But look forward to it one day. I believe with some modern graphics, branding and improvements Lazarus should look a lot better and attract more people towards it.

I am always so excited about Lazarus. I want to do so much more. But don't always have the time, unfortunately.

I am not used to requesting feature in Lazarus (don't know how to). But if anyone else can make the request for us, that would be awesome.
Lazarus TTS Tutorial | LazPlanet
Lazarus 2.2.0 | FPC 3.2.2 | Linux/OpenBSD/ReactOS

BlueIcaro

  • Hero Member
  • *****
  • Posts: 792
    • Blog personal
Re: I have written an e-book for beginners!
« Reply #13 on: December 17, 2017, 10:01:32 pm »
nsunny you did a great job. I like very much the design, it's cool. Books like that make easy learning.

/BlueIcaro

dbannon

  • Hero Member
  • *****
  • Posts: 2786
    • tomboy-ng, a rewrite of the classic Tomboy
Re: I have written an e-book for beginners!
« Reply #14 on: December 17, 2017, 11:45:29 pm »
I think this is brilliant, and I thank you on behalf of all the beginners who will become great members of the FPC/Lazarus community !  This is how we can build that community folks !

Hope you don't mind if  make a couple of constructive suggestions ?

Firstly, you use the word 'tool' when referring to visual components, I'm not sure thats a good idea. Possibility of confusing your 'tool' with the ones provided as part of FPC/Lazarus. People tend to think of tools as something you use here to help make the software rather than actually part of the software.

Secondly, installing. I think it would be a good idea to point people to the newly released install kits that ship 1.8.  The Linux package maintainers can be quite slow in pushing out new versions, especially for people on long term release OS.

Another thing you probably have not come across is how hard Mac makes things for non Mac developers. So someone attracted to Lazarus's cross platform nature may find themselves looking at a Mac for the first time. On Mac's, to use the app outside of the IDE you need to make an "application Bundle" (press the button in Project Options) and then run (from memory) ~/MyApp.app/Contents/Mac/MyApp and to move the app elsewhere you need to delete the symlink down in that location and replace it with the actual binary.

I'll try and document this process and how to make a distributed dmg file on the wiki when I get some free time. This script does it (but I don't think it would be a good idea to link directly to it) - https://github.com/tomboy-notes/tomboy-ng/blob/master/package/mk_dmg.bash Perhaps all you need do in your book is mention that Mac's need that application bundle to be made and refer people to wiki ?
Lazarus 3, Linux (and reluctantly Win10/11, OSX Monterey)
My Project - https://github.com/tomboy-notes/tomboy-ng and my github - https://github.com/davidbannon

 

TinyPortal © 2005-2018