Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
March 28, 2024, 11:07:05 11:07


Login with username, password and session length


Pages: [1]
Print
Author Topic: Magazine project code - good or bad  (Read 2815 times)
0 Members and 1 Guest are viewing this topic.
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2420

Thank You
-Given: 862
-Receive: 678


Top Topic Starter


« on: August 29, 2011, 10:14:16 22:14 »

Real strange the way lcd.h was written. First time I see lcd.h containing many other defs and prototypes for things other than LCD :S

rclock.c, lcd.c and ds1307.c and with only two header files: lcd.h and i2cmaster.h... omg... what a real mess...

C true style is to keep routines of different parts of the project separate i.e. ds1307.c and ds1307.h, lcd.c and lcd.h, etc...

The funny thing is that DS1307_Read(char address) function prototype is found in lcd.h and the function body is found in ds1307.c and is depending heavily on lcd.c LCD routines, suppose I changed the lcd.h driver, what will happen? simply a disaster... Also there are many routine prototypes declarations in the same c file, which is something I strongly disagree with and like not to see.

All in all, nice project, but these authors seem unwilling to tidy their codes...
« Last Edit: August 29, 2011, 11:03:00 23:03 by metal » Logged
microkid
Active Member
***
Offline Offline

Posts: 129

Thank You
-Given: 45
-Receive: 23


« Reply #1 on: August 30, 2011, 02:57:49 02:57 »

All of the projects has the same problem.  Most of the time we have to rewrite the code.

It is better to rework the project with your skills.

MicroKid
Logged

Never Never Never giveup
pushycat
Senior Member
****
Offline Offline

Posts: 463

Thank You
-Given: 210
-Receive: 1446



« Reply #2 on: August 30, 2011, 08:15:22 08:15 »

Yes..i too agree with Metal and microkid. Despite Projects from EFY are innnovative, the codes are not upto expectations. No idea why the authors write such codes. Another vital point to be noted is, i personally never found the magazine code which works directly. Despite the codes are given on the magzine and the CD, the microcontroller based kits supplied by Kits n Spares (An Associate company of EFY) will have modified codes to make things work. I too personally rewrite or edit them to have a professisonal touch.
Pushy
Logged
metal
Global Moderator
Hero Member
*****
Offline Offline

Posts: 2420

Thank You
-Given: 862
-Receive: 678


Top Topic Starter


« Reply #3 on: August 30, 2011, 03:13:43 15:13 »

Elektor is suffering the same codes problem (Not working codes).

I think editors of such magazines don't really care if the codes are working or not, what really matters to them is the text and images of the article.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright © 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC