Yesterday, an interesting post about Abusing assertions for debugging purposes! come from DaVinci’s Code blog. If you read comments, you see that I don’t think that assertion are somehow
That’s because I never used assertions and I never seen assertion used. I rarely heard discussing about assertion, and this is the 2nd time I see assertion used for logging purposes. Testing code with junit or things like that is much more needed than placing dummy checks.
This means two things:
- Assertions are nice, for professors at colleges and their students.
- Runtime directives to enable/disable some code could be helpful, maybe using jvm options (so the jvm can just ignore some statements). But it should be something more general than one option related only to assertion. Logging is another aspect of things that can take advantages of a feature like this, but there could be other aspects, and this should be left to be decided by the programmer
Many stuff has been taken off Java when it was designed. I think that assertion is one of those things that no one never asked for.
Search
Calendar
| M | T | W | T | F | S | S |
|---|---|---|---|---|---|---|
| « Jun | Aug » | |||||
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Archives
Categories
- Android (3)
- Apple (27)
- Books (7)
- Eclipse (14)
- Errors (4)
- Firefox (7)
- Git (2)
- Hardware (17)
- Horror Code (8)
- Internet (21)
- Java (102)
- JavaScript (9)
- Life, universe and everything (46)
- Lifehacks (25)
- Linux (51)
- Opinions (26)
- OSX (6)
- Python (1)
- Software (31)
- Speeches and Conferences (8)
- Unix (4)
- Web (23)
- Windows (19)
Tag Cloud
Android apple architecture Bash configuration CSS Development Düsseldorf Eclipse Git Google Hardware hdr How-To Java JAXB job junit Karmic Linux lion MacBook music Open Source Opinion oracle OSX patterns Pitfalls Practices Resume Security Software Suspend TDD Testing tip tonemapped Tricks Ubuntu unix video Web Workaround XML
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
Blog License
Blogs I like
Books on the desk
Friends' Blogs
- Antonio Terreno & Valter Bernardini
- Bruno Bossola
- Daniele Galluccio
- Domenico Ventura
- Ed Schepis
- Fabrizio Gianneschi
- Luca Grulla
- Luigi Zanderighi
- Marcello Teodori
- Mida Boghetich
- Muralidharan Chandrasekaran
- Piero Ricca
- Renzo Borgatti
- Simone Bordet
- Simone Bruno
- Uberto Barbini
- Valvolog
- Webtide blogs (Greg Wilkins & Jan Bartel)
Links




















No Responses to “Do we really need assertions?”
Please Wait
Leave a Reply