Author Topic: Circuit Cellar October design challenge  (Read 2384 times)

0 Members and 1 Guest are viewing this topic.

Offline gameridianTopic starter

  • Newbie
  • Posts: 4
  • Country: us
Circuit Cellar October design challenge
« on: November 05, 2016, 03:17:52 am »
The actual answer was annoying.

It ended up basically being an advertisement for the sponser's static analysis tool and the answer was simply what static analysis showed rather than the critical fault involving unbounded user entry.
« Last Edit: May 22, 2017, 11:24:51 am by gameridian »
 

Online JPortici

  • Super Contributor
  • ***
  • Posts: 3461
  • Country: it
Re: Circuit Cellar October design challenge
« Reply #1 on: November 05, 2016, 05:35:01 am »
so they have to define error. that is a bug. *maybe* it could show up as a warning depending on the compiler and if he think he's smart. as for your entry some compilers do the bound check automatically and wrap around and some doesn't. either case that would be a more serious bug
« Last Edit: November 05, 2016, 05:37:07 am by JPortici »
 

Offline German_EE

  • Super Contributor
  • ***
  • Posts: 2399
  • Country: de
Re: Circuit Cellar October design challenge
« Reply #2 on: November 05, 2016, 07:44:00 am »
Am I the only one who finds this sad? The site is called CIRCUIT Cellar and the original owner, Steve Ciarcia, was the ultimate hardware geek who wired everything in his home way before the IOT. Now their design challenge is to find the bug in a section of code, whatever happened to "my favorite language is solder"?
Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 

Offline joeqsmith

  • Super Contributor
  • ***
  • Posts: 11700
  • Country: us
Re: Circuit Cellar October design challenge
« Reply #3 on: November 05, 2016, 02:45:40 pm »
Am I the only one who finds this sad? The site is called CIRCUIT Cellar and the original owner, Steve Ciarcia, was the ultimate hardware geek who wired everything in his home way before the IOT. Now their design challenge is to find the bug in a section of code, whatever happened to "my favorite language is solder"?

I have not seen this magazine in many years.   Used to enjoy it in the BYTE and early Circuit Cellar Ink days.  Was always a mix of hardware and software.    The most memorable article for me was where he paralleled several 805x to calculate a fractal and benchmarked it. 

Offline German_EE

  • Super Contributor
  • ***
  • Posts: 2399
  • Country: de
Re: Circuit Cellar October design challenge
« Reply #4 on: November 05, 2016, 04:43:15 pm »
I still have the full collection of Circuit Cellar books on my bookshelf, they cover everything from the SC/MP in the 1970's to the Circuit Cellar XP compatible. Sure, a lot of the stuff uses obsolete chips, but there's a wealth of design information in there.
Should you find yourself in a chronically leaking boat, energy devoted to changing vessels is likely to be more productive than energy devoted to patching leaks.

Warren Buffett
 

Offline karoru

  • Regular Contributor
  • *
  • Posts: 196
  • Country: pl
Re: Circuit Cellar October design challenge
« Reply #5 on: November 08, 2016, 01:06:47 am »
Not going into question whether it's viable problem for "Circuit Cellar", it would be semi-okay question, if they added something like "we skipped input sanity check" (as you usually do in such problems because it's just boilerplate code). Saying that, every XXI-century compiler will cut out that if(i) section during optimization (unless you define i as volatile). With or without warning message, depending on your settings. It's easy to check it out using for example GCC compiler explorer on http://godbolt.org/ (just put -O1 or something in compiler flags to make it compile with optimization) :)
« Last Edit: November 08, 2016, 01:11:15 am by karoru »
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf