Lazarus Season of Code/Task 4

From Lazarus wiki
Jump to navigationJump to search

Lazarus Season of Code Tasks

Description

Write a Pascal tutorial focused on Lazarus/FPC covering the most important topics: streams, file handling, cross-platform tips, data types, records, arrays, links to the most important rtl/fcl functions, sysutils, etc...

Subtasks:

  • Put a video on Youtube explaining how to write a simple application with Lazarus with a button responding to a click.
  • Put a video on Youtube explaining how to write a database application with Lazarus

Introduction to GUI programming in RAD style

  1. Hello, World! through button click
  2. Enhancement of Hello, World! application with an edit box, showing how to retrieve control's text
  3. Set a label caption from items chosen in a radio group
  4. Add a (popup-)menu to application with some actions
  5. Saving control's and user defined application state

Introduction to general Pascal programming

  1. Creating units, functions, classes, methods
  2. Creating properties
  3. Reading and writing text files with TStringList
  4. Reading and writing to/from the console
  5. Manipulating unicode strings (Using + to add parts, iterating through UTF-8 characters, getting the length, etc)

Simple Application Development

  1. Calculator
  2. Notepad replacement (multitabbed maybe?)
  3. Chat (one room, many users)
  4. Chat 2 (many rooms, many users)

Intermediate Application Development

  1. MS Paint replacement
  2. GUI wrapper over console application
  3. Statistical values calculator (up to standard deviation, with simple chart)
  4. Inventory manager

Advanced Application Development

  1. IDE in the form of text editor + compiler + debugger
  2. Game (RPG? Tactics? Cards?)

Programming Tips

These are tips for those programming for specific situation or condition.

Online Judge / Programming Competition Tips

  1. If you're aiming for a better rank in Online Judge, look for speed. That could mean:
    • avoid object orientation (and units designed with it)
    • avoid ansistrings (except if you know how to use it properly and it's necessary)
    • don't free allocated memories (except when you REALLY REALLY need to), let it be a leak in the server but you gain much speed
  2. If you're in a programming competition, you just need to be accepted because normally the speed you solve the problem is more important than the speed of your program. In this situation, use all possible built-in capabilities (units, classes, etc.) that can help you to program as fast as possible

Cross Platform Tips

Embedded Environment Tips

Web Application Tips