Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 09, 2016, 06:27:04 18:27


Login with username, password and session length


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

Posts: 2018

Thank You
-Given: 514
-Receive: 477


Top Topic Starter


« on: August 29, 2011, 11:14:16 23: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 30, 2011, 12:03:00 00:03 by metal » Logged

nothing to say..
microkid
Active Member
***
Offline Offline

Posts: 130

Thank You
-Given: 44
-Receive: 19


« Reply #1 on: August 30, 2011, 03:57:49 03: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: 332

Thank You
-Given: 144
-Receive: 1118



« Reply #2 on: August 30, 2011, 09:15:22 09: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: 2018

Thank You
-Given: 514
-Receive: 477


Top Topic Starter


« Reply #3 on: August 30, 2011, 04:13:43 16: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

nothing to say..
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