question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Why not hardcode values?

See original GitHub issue

The goal is for the contract to be “designed to be as simple as possible”. Wouldn’t it be advantageous to hardcode the ownersArr and threshold values instead of specifying them as parameters to the constructor? 🤷‍♀️ It would make the code even simpler.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
christoph2806commented, Nov 9, 2017

for a sample implementation of this, see https://github.com/etherisc/simplestWallet

0reactions
christianlundkvistcommented, May 4, 2018

@christoph2806 @neuhaus I’m personally feeling like hardcoding values is taking things a bit too far, and I do think it will be harder to formally verify using this. It’s probably more error prone that people have to fiddle with the source code manually in order to hard code these values.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why is hard coding considered bad practice? - Quora
Hard-coded values are a huge bug farm. They breed bugs. There are 3 reasons: 1. Readability/understandability 2. Maintainability 3.
Read more >
Why You Should Avoid Hard Coding and Three Alternative ...
A best practice in technology is to not reference IDs or text directly, or “hard code” them. That same best practice applies to...
Read more >
Is it ever a good idea to hardcode values into our applications?
tl;dr: Yes, it is sometimes a good idea to hard-code values, but there's no simple rule as to when; it depends completely on...
Read more >
What is your attitude towards hard coding? - Stack Overflow
Hard coded values should always be declared on a central places in constants. · Even if a value is hard-coded, it should still...
Read more >
Don't hard code values that may change - YouTube
One of the biggest mistakes you can make is to hard code assumptions into your ... Comments at: https://exceljet.net/tips/ dont -hard-c.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found