Libre RISC-V Mailing list Archives (accessible via public-inbox)
 help / color / Atom feed
From: bugzilla-daemon@libre-riscv.org
To: libre-riscv-dev@lists.libre-riscv.org
Subject: [libre-riscv-dev] [Bug 217] create a "ring" system which allows pad locations to be specified conveniently
Date: Tue, 17 Mar 2020 01:38:16 +0000
Message-ID: <bug-217-13-7XDtwozueK@http.bugs.libre-riscv.org/> (raw)
In-Reply-To: <bug-217-13@http.bugs.libre-riscv.org/>

http://bugs.libre-riscv.org/show_bug.cgi?id=217

--- Comment #15 from Jock Tanner <tanner.of.kha@gmail.com> ---
(In reply to Jean-Paul.Chaput from comment #8)
>   Coriolis has always been tricky to install from sources (but try to build
>   the whole Gnome3 stack instead of using packaged versions to make a fair
>   comparison). As I happen to manage Cadence/Mentor/Synopsys in my lab,
>   I assure you, that they are not simpler, by a long shot (with a license
>   fee around 100K$ a year, for commercial purpose).
>     That context being setup, I know myself to have a tendency to make things
>   too complicated, but it is difficult to improve without feedback.
>     I'm always eager to improve the quality of my software and coding style,
>   but ranting about "this is badly written" do not help. I flatter myself
>   to have the "scientific spirit", so if you pinpoint me badly written code
>   and *why* it is so (with reference), I will improve it in my futur code
>   and progressively rewrite the old one.

Jean-Paul,

I'm feeling like I'm slowly burying myself in the sand, but instead of bad code
I would like to pinpoint you something much more important − bad tools you use.

There are many errors in and around Coriolis, similar to the one I found:

- clrcore/helpers/Alliance.py:199 − gaugeDatasNo is undefined
- cumulus/plugins/chip/BlockCorona.py − a lot of undefined vars
- cumulus/plugins/chip/BlockPower.py − a lot of undefined vars
- etc/coriolis2/common/colors.py − ditto

Most of these errors are outside “happy path”. But I don't have to catch all
these errors to see them. In fact I don't have to run the code at all. All I
have to do is open the file in Pycharm, and it highlights all kind of problems.
The good code is mostly black&white, while the bad code is lit up like a
Christmas tree!

'colors.py' shows another typical problem of the project. The first indent is 4
spaces, but all the following indents are 2 spaces. It most probably means that
this file once contained a class, that later was refactored into free
functions. I do that a lot. I love free functions. And my editor
indents/dedents any amount of code with one key press. I don't have to spend my
time making my indentation consistent.

Another thing is dead code. It comes in two flavors: it may be either just
unreachable or commented out.

- etc/coriolis2/common/patterns.py:109 − unreachable (and meaningless btw)
- soclayout/experiments5/ringoscillator.py:879-914 − also unreachable
- stratus/dpgen_ROM.py:861-916 − commented-out

First flavor reveals itself instantly with code highlight. Second one, well, it
kinda have a reason to be there. But if you use version control, that reason is
invalid. Especially if you can access any commit in two clicks: “Version
control” → “Log”. If you find it hard to just delete the unneeded code, well,
you must be using the bad tools.

I won't even get started on Pycharm making hard or even impossible to break
PEP8, let alone reformatting any code in an instant. The style is not a most
important problem of the project. Bad tools are.

Important disclaimer! I mostly speaking of my lovely Pycharm, because I'm lazy,
and it comes configured right out of the box. I know that the same result can
be achieved with properly configured vim, Emacs, SublimeText or Notepad++. I
just can't recommend all the necessary plugins.

Jean-Paul, if you don't want to kill me already, I can pinpoint the second big
problem. Hint: it's not the style.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
libre-riscv-dev mailing list
libre-riscv-dev@lists.libre-riscv.org
http://lists.libre-riscv.org/mailman/listinfo/libre-riscv-dev

  parent reply index

Thread overview: 87+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-12 11:57 [libre-riscv-dev] [Bug 217] New: " bugzilla-daemon
2020-03-12 16:39 ` [libre-riscv-dev] [Bug 217] " bugzilla-daemon
2020-03-12 16:57 ` bugzilla-daemon
2020-03-12 17:07 ` bugzilla-daemon
2020-03-12 17:24 ` bugzilla-daemon
2020-03-12 17:37 ` bugzilla-daemon
2020-03-13 11:36 ` bugzilla-daemon
2020-03-16 22:01 ` bugzilla-daemon
2020-03-16 23:06 ` bugzilla-daemon
2020-03-16 23:25 ` bugzilla-daemon
2020-03-16 23:38 ` bugzilla-daemon
2020-03-17  0:05 ` bugzilla-daemon
2020-03-17  0:19 ` bugzilla-daemon
2020-03-17  0:24 ` bugzilla-daemon
2020-03-17  0:30 ` bugzilla-daemon
2020-03-17  1:38 ` bugzilla-daemon [this message]
2020-03-17  1:54 ` bugzilla-daemon
2020-03-17  6:53 ` bugzilla-daemon
2020-03-17  7:17 ` bugzilla-daemon
2020-03-17  7:26 ` bugzilla-daemon
2020-03-17  7:43 ` bugzilla-daemon
2020-03-17 13:04 ` bugzilla-daemon
2020-03-17 13:48 ` bugzilla-daemon
2020-03-17 14:19 ` bugzilla-daemon
2020-03-17 14:22 ` bugzilla-daemon
2020-03-17 14:52 ` bugzilla-daemon
2020-03-17 14:58 ` bugzilla-daemon
2020-03-17 15:12 ` bugzilla-daemon
2020-03-17 15:24 ` bugzilla-daemon
2020-03-17 16:06 ` bugzilla-daemon
2020-03-17 16:41 ` bugzilla-daemon
2020-03-17 17:06 ` bugzilla-daemon
2020-03-17 17:24 ` bugzilla-daemon
2020-03-17 17:28 ` bugzilla-daemon
2020-03-17 17:42 ` bugzilla-daemon
2020-03-17 17:53 ` bugzilla-daemon
2020-03-17 18:07 ` bugzilla-daemon
2020-03-17 18:55 ` bugzilla-daemon
2020-03-18 14:31 ` bugzilla-daemon
2020-03-18 15:15 ` bugzilla-daemon
2020-03-18 22:09 ` bugzilla-daemon
2020-03-18 23:39 ` bugzilla-daemon
2020-03-20 12:09 ` bugzilla-daemon
2020-03-26 21:39 ` bugzilla-daemon
2020-03-26 22:58 ` bugzilla-daemon
2020-03-27  0:03 ` bugzilla-daemon
2020-03-27  0:38 ` bugzilla-daemon
2020-03-27  1:27 ` bugzilla-daemon
2020-03-27  2:17 ` bugzilla-daemon
2020-04-06 14:18 ` bugzilla-daemon
2020-04-06 16:53 ` bugzilla-daemon
2020-04-06 16:58 ` bugzilla-daemon
2020-04-06 17:15 ` bugzilla-daemon
2020-04-07  8:12 ` bugzilla-daemon
2020-04-07  9:46 ` bugzilla-daemon
     [not found] <bug-217-13@https.bugs.libre-soc.org/>
2020-04-20 14:16 ` bugzilla-daemon
2020-04-20 15:55 ` bugzilla-daemon
2020-04-20 17:15 ` bugzilla-daemon
2020-04-20 18:10 ` bugzilla-daemon
2020-04-20 18:25 ` bugzilla-daemon
2020-04-20 18:33 ` bugzilla-daemon
2020-04-20 19:00 ` bugzilla-daemon
2020-04-20 19:08 ` bugzilla-daemon
2020-04-20 19:16 ` bugzilla-daemon
2020-04-20 19:20 ` bugzilla-daemon
2020-04-20 19:52 ` bugzilla-daemon
2020-04-20 20:45 ` bugzilla-daemon
2020-04-20 21:00 ` bugzilla-daemon
2020-04-20 22:17 ` bugzilla-daemon
2020-04-21 12:12 ` bugzilla-daemon
2020-04-21 13:17 ` bugzilla-daemon
2020-04-21 14:32 ` bugzilla-daemon
2020-04-21 15:12 ` bugzilla-daemon
2020-04-21 15:22 ` bugzilla-daemon
2020-04-21 15:49 ` bugzilla-daemon
2020-04-21 16:16 ` bugzilla-daemon
2020-04-21 16:55 ` bugzilla-daemon
2020-04-21 17:03 ` bugzilla-daemon
2020-04-21 17:40 ` bugzilla-daemon
2020-04-21 18:05 ` bugzilla-daemon
2020-04-21 19:24 ` bugzilla-daemon
2020-04-21 20:23 ` bugzilla-daemon
2020-04-21 20:43 ` bugzilla-daemon
2020-04-21 21:19 ` bugzilla-daemon
2020-04-21 22:00 ` bugzilla-daemon
2020-04-21 22:21 ` bugzilla-daemon
2020-05-20 12:20 ` bugzilla-daemon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-217-13-7XDtwozueK@http.bugs.libre-riscv.org/ \
    --to=bugzilla-daemon@libre-riscv.org \
    --cc=libre-riscv-dev@lists.libre-riscv.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Libre RISC-V Mailing list Archives (accessible via public-inbox)

Archives are clonable: git clone --mirror https://inbox.libre-soc.org/libre-riscv-dev

Example config snippet for mirrors


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git