www.delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2015/02/11/07:38:38

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
Message-ID: <54DB4CF6.6020305@think-open.at>
Date: Wed, 11 Feb 2015 13:37:10 +0100
From: Bernhard Kraft <kraftb AT think-open DOT at>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
MIME-Version: 1.0
To: geda-user AT delorie DOT com
References: <CAOP4iL2stWVCy3WK0=SNu2zAbs8t6B0uyAgFuOnzG8v_MrYNfw AT mail DOT gmail DOT com> <CAGde_xN5gs5r_on=HP2RN7cy6E=2EL9eK3cp+sd9BfBaWNLVew AT mail DOT gmail DOT com> <20150204193720 DOT Horde DOT 42xUN-NzhCJRWZne-M5eCQ1 AT webmail DOT in-berlin DOT de> <90236728-E79D-47C7-BFB1-34140DB85ACB AT sbcglobal DOT net> <CAOFvGD4M48Ap=UQzL_T3yzas2rJrNFfxXRUOkOe8gA8J3bQCHg AT mail DOT gmail DOT com> <1423323918 DOT 1592 DOT 10 DOT camel AT cam DOT ac DOT uk> <CAOFvGD6rwqf79obnSRQ4gyM0h8_5PQ-C0G2guRp8YU80oOAkig AT mail DOT gmail DOT com> <1423329222 DOT 1592 DOT 12 DOT camel AT cam DOT ac DOT uk> <54D67B5B DOT 6060205 AT neurotica DOT com> <CAM2RGhTsJczAgDN7v1AeO9wRVmJjDCswUNuy=QhzK7eJRVwMuw AT mail DOT gmail DOT com> <20150207221252 DOT GA26071 AT recycle DOT lbl DOT gov> <201502072246 DOT t17MktFH026329 AT envy DOT delorie DOT com> <CAM2RGhTzA2_JVJAfAg-7wanE-nSah2B9p-bGwrstfK_8DrCmFA AT mail DOT gmail DOT com> <201502080108 DOT t1818x8P031447 AT envy DOT delorie DOT com>
In-Reply-To: <201502080108.t1818x8P031447@envy.delorie.com>
X-Spam_score: -2.9
X-Spam_score_int: -28
X-Spam_bar: --
X-Spam_report: Spam detection software, running on the system "think-open.at", has
identified this incoming email as possible spam. The original message
has been attached to this so you can view it (if it isn't spam) or label
similar future email. If you have any questions, see
the administrator of that system for details.
Reply-To: geda-user AT delorie DOT com

 Content preview:  Hi, On 2015-02-08 02:08, DJ Delorie wrote: > PCB's source
   is *ancient*. Even a simple clean-up pass would be a > large undertaking.
   It's probably one of the first examples of > object-oriented programming.
   [...] 
 
 Content analysis details:   (-2.9 points, 5.0 required)
 
  pts rule name              description
 ---- ---------------------- --------------------------------------------------
 -1.0 ALL_TRUSTED            Passed through trusted hosts only via SMTP
  0.0 URIBL_BLOCKED          ADMINISTRATOR NOTICE: The query to URIBL was blocked.
                             See
                             http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block
                              for more information.
                             [URIs: wikipedia.org]
  0.0 TVD_RCVD_IP            Message was received from an IP address
 -1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                             [score: 0.0000]
X-SA-Exim-Connect-IP: 89.104.9.138
X-SA-Exim-Mail-From: kraftb AT think-open DOT at
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on think-open.at
X-Spam-Level: 
X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00,
	TVD_RCVD_IP,URIBL_BLOCKED autolearn=unavailable version=3.3.2
Subject: Re: [geda-user] FOSDEM
X-SA-Exim-Version: 4.2.1 (built Mon, 26 Dec 2011 16:24:06 +0000)
X-SA-Exim-Scanned: Yes (on mail.think-open.at)

Hi,

On 2015-02-08 02:08, DJ Delorie wrote:

> PCB's source is *ancient*.  Even a simple clean-up pass would be a
> large undertaking.  It's probably one of the first examples of
> object-oriented programming.

Doing electronics is currently rather a hobby for me than my day to day 
work. I usually work as a web developer working with and developing the 
content management system TYPO3. I will try to put down some of my 
experience in there - maybe it makes sense for PCB also:

======

The CMS was created around the beginning of the millenia and since then 
got a lot of improvements. Especially during the last few years the 
complete core system got refacatored and parts got reimplemented to 
adhere to modern programming paradigms.

* They started with writing a bunch of units tests (units tests and 
functuional tests) for every thinkable code piece creating large code 
coverage.

* Then they introduced namespaces for every class (like in Java), split 
code up, removed duplicated code, etc.

* Unclear sections of code got documented, design patters were 
introduced (documented) where possible.


But in the meantime another group of people from the TYPO3 projcet 
started to create a whole new web framework (flow) + CMS (TYPO3 Neos). 
Like a second track. The framework itself was backported to TYPO3 CMS 
and parts of the core now rely on it - so they are tied together.

Some people were against a complete new start, others didn't like the 
old-school way how the product was created in the first place.

======

In the web-world there is a lot of common knowledge about what a 
CMS/web-framework needs to do, requires to have, etc. There needs to be 
a request dispatcher, a templating framework, a database abstraction, a 
persistence layer, domain models for every data structure, etc.

Maybe it would be a first start of refactoring PCB to define those 
requirements. If I would make a dummy-start I would create a list like:

* GUI Interface (human interface)
* Rendering engine (render the layout)
* DRC engine (enforce electrical rules)
* persistence layer (abstract data storage)
* plugin engine (i.e. for the autorouter)
* undo/redo logic
* etc.

Some time ago I started to read the famous "Design Patterns" book from 
the GoF [1]. Altough I got stuck on around page 90 I found the 
information very useful. The book describes most of the commonly found 
design patterns of software architecture, how to implement them properly 
and where they can be used.

Sadly the book focues on creating a new product rather than refactoring 
and cleaning up an old one.


[1] http://en.wikipedia.org/wiki/Design_Patterns
(wow. It even has its own wiki page :)

greetings,
Bernhard
-- 
Wer nicht gelegentlich auch einmal kausalwidrige Dinge zu denken vermag,
wird seine Wissenschaft nie um eine neue Idee bereichern können.
Max Planck (1858-1947)

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019