Recent

Author Topic: Interview tomorrow - design patterns  (Read 2616 times)

tudi_x

  • Hero Member
  • *****
  • Posts: 532
Interview tomorrow - design patterns
« on: November 23, 2017, 04:18:23 pm »
hi All,
i am having interview tomorrow and it looks like in the agenda are design patterns.
are you guys using design patterns in your activity?
any advantages or disadvantages from your experience?
please help.
thank you!
Lazarus 2.0.2 64b on Debian LXDE 10

Thaddy

  • Hero Member
  • *****
  • Posts: 14163
  • Probably until I exterminate Putin.
Re: Interview tomorrow - design patterns
« Reply #1 on: November 23, 2017, 05:14:32 pm »
Start with this:

A design pattern is a recognizable - it often occurs - repeatable - we can duplicate behavior - set of steps that a programmer encounters often, formalized into an abstract  template.
Then google on "gang of four".

https://www.gofpatterns.com/

Note it is therefore not science but practice.

« Last Edit: November 23, 2017, 05:28:47 pm by Thaddy »
Specialize a type, not a var.

balazsszekely

  • Guest
Re: Interview tomorrow - design patterns
« Reply #2 on: November 23, 2017, 05:46:12 pm »
@tudi_x

 I'm gonna predict your interview questions:
1. Tell us something about your past projects
2. What is a singleton class
3. What is the observer pattern
4. How can you add n numbers without using loops

PS: You can sue me tomorrow if I'm wrong  :D

jmpessoa

  • Hero Member
  • *****
  • Posts: 2296
Re: Interview tomorrow - design patterns
« Reply #3 on: November 23, 2017, 05:51:20 pm »

There is a didactic text:

Head First "Design Patterns: A Brain-Friendly Guide" by Eric Freeman
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

Thaddy

  • Hero Member
  • *****
  • Posts: 14163
  • Probably until I exterminate Putin.
Re: Interview tomorrow - design patterns
« Reply #4 on: November 23, 2017, 05:51:55 pm »
@tudi_x

 I'm gonna predict your interview questions:
1. Tell us something about your past projects
2. What is a singleton class
3. What is the observer pattern
4. How can you add n numbers without using loops

PS: You can sue me tomorrow if I'm wrong  :D
You are in desperate need of a factory pattern...
Although I like 1. which isn't in the GoF set: the extrapolation pattern....
Specialize a type, not a var.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Interview tomorrow - design patterns
« Reply #5 on: November 23, 2017, 05:56:21 pm »
@tudi_x

 I'm gonna predict your interview questions:
1. Tell us something about your past projects
A: something about your past projects.
2. What is a singleton class
A: a hard core bachelor
3. What is the observer pattern
A: that one odd person in the corner that likes to watch.
4. How can you add n numbers without using loops
A: use a calculator or better yet an accountant.
:P
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018