473,887 Members | 2,284 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Nasty code...but please critique it anyway :-)

Hi!
I posted a message a while back asking for project suggestions, and decided
to go with the idea of creating an adventure game (although it was never
intended to be a 'proper' game, rather an excuse to write- and learn- some
C++).

To cut a long story short, I wrote a fair chunk of it, but realised that
it's... not very good. Okay, it's my first "proper" C++ program, so that's
no big deal, but I don't want to waste more time working on a program that
should be rewritten from scratch (I want to start reading 'Accelerated C++'
instead). What *would* be interesting would be to hear what other people
think about the (compilable, but not properly working) code.

It's a long program, spread over many files, so I haven't posted them here.
The URL is
http://www.mstrorm.free-online.co.uk/
Yes, I know the code isn't particularly well laid out or commented- but I
hope it's clear enough.

The design of the program is that a Controller class controls the flow of
events and oversees everything. A base-class 'Noun' includes common behavior
and is extended to give us game locations, items (i.e. physical objects),
Beings (i.e. game characters, further subclassed for the Player object which
represents the human player) and exits.
Given a command such as
eat chocolate
or
go north
the controller finds the Noun-subclass-object representing chocolate (an
Item) or north (an Exit)- that object then does the action "eat" or "north"
respectively. Assuming the Noun-subclass supports that action, it can
respond appropriately (e.g. the Exit object with id=="north" would update
the player's location in its "go" method to wherever the exit pointed to).
Note that action methods (or, more specifically, functions) are static
functions held in a vector of pointers. I don't like the way that the vector
of function-pointers is initialized, but it seemed the best way at the time.

Criticisms of the large-scale design, or basic programming would be equally
useful. I think there's plenty to criticize about both, as you can see from
the comments I left in (though I like the subclassing of Nouns into
different object types).

Anyway, feedback would be appreciated....

--

Michael Strorm
ms*****@yahoo.c o.uk
Jul 19 '05
26 2964
Martijn Lievaart <m@rtij.nl.remo vefromhere.inva lid> wrote in message news:<pa******* *************** ******@rtij.nl. removefromhere. invalid>...
On Thu, 06 Nov 2003 12:51:57 -0800, J. Campbell wrote:
Jerry Coffin <jc*****@taeus. com> wrote in message news:<MP******* *************** **@news.clspco. adelphia.net>.. .
In article <b9************ **************@ posting.google. com>,
ma**********@ya hoo.com says...

[ ... ]

> I must be pretty dense...I had the hardest time understanding what I
> was doing wrong. I think I get it now. Will you take a look at the
> (revised) code from my first link in this thread and tell me if my use
> of headers is now more or less normal?

If I still had the link handy I would, but I don't...
http://home.bellsouth.net/p/PWP-brightwave

Sorry I didn't include the link before...I didn't want people to think
that I was entheusiastical ly pimping my novice code, and the link was
just up the thread, at least on my newsreader ;-) Anyway, thanks for
responding.

unencrypt.h:15: `Filespec' was not declared in this scope

(snip a lot more errors due to missing headers)

make: *** [J_Crypt.o] Error 1

Compilation exited abnormally with code 2 at Fri Nov 7 10:18:11

It really is better to watch your case. :-)
Martijn, thanks for the reply.

Sorry about the case errors with compilation...I t's a hard error to
catch when there is no (local) penalty for making it (on my DOS
machine).

A quick look on some random chosen files.

- hashSclass.h
You only need <string>, move all the other #includes to the C++ files.

Is this a style issue? I moved all #includes to the header because I
read in a different thread (while trying to understand appropriate use
of headers), "put everything that will be needed for the class in it's
header", which makes some sense. Is there a reason to put the
#includes in the *.cpp file? I'm not arguing a point, just trying to
learn ;-)
- J_Crypt.h
A file that includes all other headers. A style issue, but I don't like
it. Also, including <iostream> may lead to code bloat and longer
compilation times. Include it only where needed.
Any pointers to where I can learn about using <iosfwd> instead of
<iostream>?

Can you demonstrate how to use <iosfwd> rather than <iostream> to
avoid code bloat in the following, trivial example?

#include <iostream>
using namespace std;
int main(){
cout << "Thanks Martijn!" << endl;
return 0;
}


- Encrypt.cpp
Looks good. Good comments, very readable. Only thing is that you do user
interaction here. Better to decouple this. A way to do that would be to
pass a const ostream& or a function pointer to a function that can write
strings. The latter technique makes sure you can use the same encrypt
routine in a GUI program as well.
Thanks for the advice...I'll need to ponder this a bit before it is
clear...I suspect it may not be until I start writing code for GUI
use. However, it does make sense. If I understand, you are saying
that I should remove *all* commands that output information to the
screen from this function, because it makes the function less
reusable?

- menu.cpp
* Get text by line and parse that, good!
* You may want to use a std::stringstre am to parse the integer, else just
use atoi.
* Why not print the menutext the first time from menu1 as well?
Inconsistent.
* You may want to flush the output stream after printing menutext, in
trhis function you cannot be sure it is terminated with a newline.
Thanks for the advice

HTH
M4


BTW, What's HTH?? "Hate to harp"?
Jul 19 '05 #21
Jerry Coffin <jc*****@taeus. com> wrote in message news:<MP******* *************** **@news.clspco. adelphia.net>.. .
In article <b9************ **************@ posting.google. com>,
ma**********@ya hoo.com says...

Well, I've taken a look at the code, and I still think it could use some
work. One obvious point would be that there are quite a few places that
use std::cout (for one example) directly (e.g. HashS::showhex and
Slicer::SeedMe) .

IMO, these should take a stream as a parameter, and use that stream,
rather than always using std::cout and std::cin.
Thanks for the time. Sorry to keep dragging this out. I agree that
outputting to stream would offer more flexibility. I made it as is
because if the string of the hash (a "gettable value")is printed it
can contain non-printable characters...an d I wanted the class to have
an in-built way to *display* itself to the user. So...you'd advise
outputting the hex-formated output to a stringstream then pass that
back from the function as a string? Makes sense but makes it slightly
harder to use, since the user would then have 2 different ways of
getting the hash...the displayable but not usable form, and the usable
but not displayable form. I was trying to avoid that by making a
"show" and a "get" function, rather than 2 different "get" functions.
Anyway, I realize that I'm novice enough that I'm quite likely trying
to justify a poor design decision. Any further thoughts on this?

As-is, your HashS class looks to me like it's a function in hiding (so
to speak).
good point. I think I'll change it, since there is no reason to keep
the object once it has returned it's value, and the:
class instance(data);
instance.hash() ;
motif that needs to be used with the current setup is awkward. a
simple:
string hashfunction(da ta);
function would be less awkward to use.
File_spec looks a bit similar -- you basically just
construct a File_spec from a string, and then use (public, no less) data
members of the object. I see little advantage to this design.
What's the better way? I was basically trying to avoid parsing the
filespec multiple times, or passing so many strings (eg path + root +
ext) into functions...see med easier (and less error-pront) to pass the
class.

It's also somewhat confusing that encrypt.cpp contains only a driver,
and the encryption proper is done in slicer_class -- the latter name, in
particular, gives not even a hint as to the real use or point of the
class.
Well...I was writing PRNG's with names that were descriptive (to me
anyway) of how they worked. Slicerclass happened to be a pretty good
one at generating solid random data that passes all tests for
randomness that I'm aware of. I decided to keep the PRNG as a
stand-alone class that spits out random data, rather than to write it
as an encrypter that accept files and spit out encrypted files.
(other than having a more useful name like My_PRNG) do you have a
suggestion about how to use the PRNG? Would you write a "super-class"
that includes all the functionality of a PRNG, and all the
functionality of the hasher, and all the functionality of the
encrypter, and the associated helper functions? I thought that I had
essentially done this with my "driver" function, while keeping my PRNG
class (slicer_class) usable as a general purpose PRNG.

Though I've been _trying_ to stick to commenting on how the code is
written, I can't help pointing out that your design for the file format
makes a ciphertext-only attack _dramatically_ easier than it should be.
Hey...I'll take free criticisim where I can get it...I appreciate it
;-)
To get any hope of security, you want to make it as difficult as
possible to even guess at whether a decryption was successful or not --
if at all possible, you'd like almost any key to produce something
that's reasonable, so it's as difficult as possible for the attacker to
decide whether a given key is correct. Your design does the opposite:
it tells him immediately whether his guess at a key was correct.


Well, since I built authentication into the system, the user *needs*
to know if he correctly unencrypted the file. While I agree that
telling him that he got it correct would make a dictionary attack
easier (if I understand the attack that you imply), I thought it
wasn't really an issue since I wrote the prog so that such an attack
would be costly at circa 1+ second / try. At this rate(using a single
modern computers) it would take something like 150 million years to
test all 8-character passwords (92 characters (u-case, l-case, nums &
punctuation)), and over a trillion yrs if a 10 char pass is used...
(in case you are reading and say, "bull...all 8 char combinations can
be generated in *much* less time, I need to tell you that the program
uses an initialization vector whereby each PRNG is stepped forward as
fast as the computer can muster for at least 0.5 seconds before it is
used. And 2 independent PRNGs must be initialized to unencrypt.)

Thanks, SO MUCH, for the input. Last week when I posted the code, my
use of header files was whacked...I was including *.cpp files into the
main-containing file and compiling the whole thing into a single
object file...You helped kick my ass to at least get me stumbling down
a smoother road.

Joe
Jul 19 '05 #22
J. Campbell wrote:
Martijn Lievaart <m@rtij.nl.remo vefromhere.inva lid> wrote in message news:<pa******* *************** ******@rtij.nl. removefromhere. invalid>...

A quick look on some random chosen files.

- hashSclass.h
You only need <string>, move all the other #includes to the C++ files.

Is this a style issue? I moved all #includes to the header because I
read in a different thread (while trying to understand appropriate use
of headers), "put everything that will be needed for the class in it's
header", which makes some sense. Is there a reason to put the
#includes in the *.cpp file? I'm not arguing a point, just trying to
learn ;-)


The recommendation is to #include all the types that are
required by a header but no more.

Take the following header files:

fred.h
======

class Fred {
};
wilma.h
=======

#include "fred.h"

class Wilma {
Fred partner;
};
pebbles.h
=========

#include "wilma.h"

class Pebbles {
Fred father;
Wilma mother;
};

now if ever Wilma decides that Fred is superflous to
requirements and removes the include of fred.h then pebbles
will no longer know about her father. So pebbles.h should
include fred.h not rely on the indirect inclusion from
wilma.h That is what is meant by "put everything that will
be needed for the class in it's header".

Having made the changes so that you now have:

wilma.h
=======

class Wilma {
};
pebbles.h
=========

#include "wilma.h"
#include "fred.h"

class Pebbles {
Fred father;
Wilma mother;
};

milkman.h

#include "wilma.h"

class Milkman {
Wilma customer;
};

if wilma.h also included pebbles.h because it was used in
wilma.cpp then the Milkman would become dependent on both
pebbles and fred too.

Jul 19 '05 #23
On Fri, 07 Nov 2003 06:53:21 -0800, J. Campbell wrote:
unencrypt.h:15: `Filespec' was not declared in this scope

(snip a lot more errors due to missing headers)

make: *** [J_Crypt.o] Error 1

Compilation exited abnormally with code 2 at Fri Nov 7 10:18:11

It really is better to watch your case. :-)
Sorry about the case errors with compilation...I t's a hard error to
catch when there is no (local) penalty for making it (on my DOS
machine).


Yes I know. I found out the hard way when porting 300KLOC. That was not
fun, but a good opporunity to better my scripting skills.
A quick look on some random chosen files.

- hashSclass.h
You only need <string>, move all the other #includes to the C++ files.

Is this a style issue? I moved all #includes to the header because I
read in a different thread (while trying to understand appropriate use
of headers), "put everything that will be needed for the class in it's
header", which makes some sense. Is there a reason to put the
#includes in the *.cpp file? I'm not arguing a point, just trying to
learn ;-)


Decoupling. It makes maintenance easier in the end. Include in the header
only what you need to compile the header. Put in the cpp file what you
need to compile that cpp file. It also lessens compile times (except when
you have a broken precompiled header implementation) .
- J_Crypt.h
A file that includes all other headers. A style issue, but I don't like
it. Also, including <iostream> may lead to code bloat and longer
compilation times. Include it only where needed.


Any pointers to where I can learn about using <iosfwd> instead of
<iostream>?


Ahhh, Google? Scott Meyers "Effective STL" and Jossutis "The standard C++
Library" come to mind. Thos are books every C++ programmer should have
anyhow.
Can you demonstrate how to use <iosfwd> rather than <iostream> to avoid
code bloat in the following, trivial example?

#include <iostream>
using namespace std;
int main(){
cout << "Thanks Martijn!" << endl;
return 0;
}
No, you need <iostream> to compile this, you would use <iosfwd> in headers
where you only need the forward declarations to classes like ostream. E.g:

-- file.h

#include <iosfwd>

class X {
public:
void print(std::ostr eam&);
};
Thanks for the advice...I'll need to ponder this a bit before it is
clear...I suspect it may not be until I start writing code for GUI use.
However, it does make sense. If I understand, you are saying that I
should remove *all* commands that output information to the screen from
this function, because it makes the function less reusable?
Exactly.
BTW, What's HTH?? "Hate to harp"?


www.acronymfinder.com is your friend.

HTH,
M4

Jul 19 '05 #24
In article <b9************ **************@ posting.google. com>,
ma**********@ya hoo.com says...

[ ... ]
Thanks for the time. Sorry to keep dragging this out. I agree that
outputting to stream would offer more flexibility. I made it as is
because if the string of the hash (a "gettable value")is printed it
can contain non-printable characters...an d I wanted the class to have
an in-built way to *display* itself to the user.
Separating "display" from "store" is perfectly fine, and irrelevant to
what I'm talking about here.
So...you'd advise
outputting the hex-formated output to a stringstream then pass that
back from the function as a string?
I suppose you could do that, but it's not what I had in mind at all. I
was thinking of something a bit simpler. Right now, showhex looks
roughly like this:

void HashS::showhex( ) {

std::cout << various_stuff;
}

I was talking about changing that to something like this:

void HashS::showhex( std::ostream os) {

os << various_stuff;
}
Makes sense but makes it slightly
harder to use, since the user would then have 2 different ways of
getting the hash...the displayable but not usable form, and the usable
but not displayable form. I was trying to avoid that by making a
"show" and a "get" function, rather than 2 different "get" functions.
Anyway, I realize that I'm novice enough that I'm quite likely trying
to justify a poor design decision. Any further thoughts on this?
It's open to some question, but it's not the question I was asking. A
hash _is_ a numeric value, so it might also be reasonable to just have a
function to get the value (probably as some user-defined long-integer
type) and then separately have functions to deal with formatting that
type for display, storage, etc. That's a bit beyond what I had in mind
at the moment though.
good point. I think I'll change it, since there is no reason to keep
the object once it has returned it's value, and the:
class instance(data);
instance.hash() ;
motif that needs to be used with the current setup is awkward. a
simple:
string hashfunction(da ta);
function would be less awkward to use.
I quite agree -- it looks (to me) like the only other time you use the
hash object after creation is the display function we discussed above.
It looks to me like you may have had something somewhat different in
mind to start with, but it ended up being simplified out of existence
before all was said and done.

One thing that might be worth considering is defining your own type to
hold the hash value -- it doesn't look to me like a string is the ideal
type for the job.
File_spec looks a bit similar -- you basically just
construct a File_spec from a string, and then use (public, no less) data
members of the object. I see little advantage to this design.


What's the better way? I was basically trying to avoid parsing the
filespec multiple times, or passing so many strings (eg path + root +
ext) into functions...see med easier (and less error-pront) to pass the
class.


It depends -- as-is, you might about as well have a single function that
manipulates data in a normal struct. For a class to make much sense,
the class should encapsulate _something_. As-is, your class has almost
no intelligence, no encapsulation, etc.
Well...I was writing PRNG's with names that were descriptive (to me
anyway) of how they worked. Slicerclass happened to be a pretty good
one at generating solid random data that passes all tests for
randomness that I'm aware of. I decided to keep the PRNG as a
stand-alone class that spits out random data, rather than to write it
as an encrypter that accept files and spit out encrypted files.
(other than having a more useful name like My_PRNG) do you have a
suggestion about how to use the PRNG? Would you write a "super-class"
that includes all the functionality of a PRNG, and all the
functionality of the hasher, and all the functionality of the
encrypter, and the associated helper functions?
No -- rather the contrary. I'd probably split things up quite a bit
more finely. Right now, your random number generator has one function
that's really related to generating a random number, which is good, but
also has things to give direct access to the key (almost certainly NOT
good) getting an init vector and system size (apparently both of which
are somehow related to repeating a sequence, but only in some rather
ill-defined way.

I'd have a couple of classes. First would be an PRNG state. It would
incorporate enough to be able to store a state of the PRNG, and restore
it later -- rather than your get_system_size , get_init_vector , etc.,
being stored (and manipulated?) by the user in some unknown way, have a
PRNG state that can be created, stored, assigned, and used to create a
stream.

Separate from that, I'd have the encryptor that combines the random
stream with the data to produce the encrypted stream.
I thought that I had
essentially done this with my "driver" function, while keeping my PRNG
class (slicer_class) usable as a general purpose PRNG.
Perhaps I missed something, but right now the separation doesn't look
very clean, and your encryption seems to know quite a bit about the
internals of the PRNG, to the point that you probably could not (for one
example) plug in some totally different PRNG at a moment's notice.
Well, since I built authentication into the system, the user *needs*
to know if he correctly unencrypted the file. While I agree that
telling him that he got it correct would make a dictionary attack
easier (if I understand the attack that you imply), I thought it
wasn't really an issue since I wrote the prog so that such an attack
would be costly at circa 1+ second / try.


That would sort of apply in the case of a dictionary attack, but really
would not to a dictionary attack. A PRNG is basically an algorithmic
way of creating a large, but still finite, sequence of numbers. The
seed to the PRNG simply selects a point in that sequence at which to
start using numbers.

When you do your second of looping, you still end up selecting _some_
point in that sequence. If I skip over the second of looping, I pick
some point in the sequence as well. If I'm doing a brute-force attack,
my plan is to simply look at _every_ starting point in the sequence
until I find the one you used -- and the fact that I got there by a
somewhat different route than you did is utterly irrelevant.

IOW, a brute force attack has no reason whatsoever to use one second per
candidate key.

I haven't tried to figure out the details of a dictionary attack, but in
your bounce(), you seem to use only linear operations. Assuming that's
correct, any number of iterations can be collapsed down to a single,
constant-time operation, meaning your 1-second loop can be reduced to a
matter of a few nanoseconds.

Anyhow, this is getting wildly off-topic, so I'll leave it alone for
now.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jul 19 '05 #25
In article <bo************ *@ID-203936.news.uni-berlin.de>,
li******@godzil la.net says...

[ ... ]
The recommendation is to #include all the types that are
required by a header but no more.


Anybody who says anything about "the recommendation" on this point
clearly hasn't a clue of what he's talking about.

There are at least two entirely separate theories on this: one says that
no header should include any other header -- if a header needs to use
types from other headers, you include those headers before you include
this one. This style was (and to a lesser extent remains) quite common
on, for one example, UNIX and similar OSes. Just for example, many of
the sys/* header require that you include sys/types.h first. The same
is true in the Windows world, where most other system-oriented headers
require that you include windows.h first.

Another theory runs that a header should be independent, so you can
include it without explicitly including any other headers first; any
other headers needed for it to work correctly, it should include itself.

There is, to some extent, a middle ground between these as well: make a
header independent by including only forward declarations of other types
needed for that header to work. This is arguably cleaner than either
extreme, but almost certainly the most difficult to do well also -- in
particular, it more or less requires generating one complete header, and
another containing only the forward declarations. Theoretically, this
saves you from including a lot of unnecessary "stuff" (especially extra
names that could conflict) from the full-blown header. IMO, it's rarely
worth it: reasonable use of namespaces removes the conflict, so at best
you're talking about going to a fair amount of extra work to reduce
compile times. A header large enough for this to make a real difference
is a good clue that you have other problems. This is usually roughly
equivalent to giving a band-aid and an aspirin to somebody who's just
stepped on a land-mine.

--
Later,
Jerry.

The universe is a figment of its own imagination.
Jul 19 '05 #26
Jerry Coffin <jc*****@taeus. com> wrote in message news:<MP******* *************** **@news.clspco. adelphia.net>.. .

Thanks Jerry for the intelligent commentary. The goal was to get my
feet wet with C++, and seeing that I'm now considering getting some
waders, it looks like success! No need to reply to this...you've
given me enough of your time on this project...I really appreciate it.
I'm going to make a couple comments, but agree that this is way off
topic to the c++ newsgroup.
If I'm doing a brute-force attack,
my plan is to simply look at _every_ starting point in the sequence
until I find the one you used -- and the fact that I got there by a
somewhat different route than you did is utterly irrelevant.
I agree. I guess my assumption (always dangerous) is that it would be
easier to try to brute the pass, rather than the hash of the pass,
considering that the hash is 256 bytes and it would be unlikely that a
pass would be that big.
I haven't tried to figure out the details of a dictionary attack, but in
your bounce(), you seem to use only linear operations. Assuming that's
correct, any number of iterations can be collapsed down to a single,
constant-time operation, meaning your 1-second loop can be reduced to a
matter of a few nanoseconds.
If my read of S. Wolfram's book is correct, I don't believe that this
system(the "Rule 30" 1d binary cellular automata) can be reduced. You
can certainly make a single equation that will produce the output
after n-iterations, but that equation will get longer and more complex
for each step that you want to bypass...and in the end is
computationally equivalent to letting the system develop according to
the rule.

It's not all that apparent from the code that my PRNG *is* equivalent
to this system, because for speed, the system has been turnd on it's
ear so that it can be updated in parallel with only 2 shift operations
required(the first and last word of the array holding the system)
rather than shifting every word at each iteration when implemented the
"natural" way. The result of doing this is that the bits coming out
of the system are not in the "natural" order, but, since this system
is non-reversable, and since it produces a good 'random-appearing'
sequence, It's the way I choose to do it

Also, regarding the use of a plug-in PRNG...actually the PRNG has a
get_rand() function that retuens a 4-byte random number...and the
Encrypter() function can trivially make use of this, so,
theoretically, another PRNG should be usable...althou gh the details of
how to seed it would need to be coded...

The point of returning a pointer to the key was to give access to
blocks of random data, rather than just a word at a time. Since,
using default values, the system is 8kb, returning 1kb data between
update cycles, you can get this data all at once rather than using 256
calls to get_rand(). This doesn't really reveal any more of the
internal state than simply getting the numbers 1 at a time.

The reason for having the public functions get_system_size (),
get_init_vector (), etc is because this information is needed to
unencrypt the file...it'd be easy to fix these values to constants so
that a user would be unaware that they even exist...however , I thought
it made a better PRNG to have the system parameters specifiable. This
way, you can use the PRNG in "non-deterministic mode(when
time_initialize is used)" when you don't want the same sequence on
subsequent runs, or you can specify the initialization vector to get
the identical "random appearing" sequence for subsequent runs.

Anyway, I suspect that your interests are more in general
math/programming/science/anything stimulating, than in the details of
some lame home-brew crypto system. ;-) However, if you are interested
in poking more holes in, discussing, or in better understanding my
PRNG or cyrpto-system, I'll be a willing participant in the discourse.

Ciao,

Joe
jkc8289 at symbol bellsouth dot net


Anyhow, this is getting wildly off-topic, so I'll leave it alone for
now.


I don't blame you. Thanks again for the help.
Jul 19 '05 #27

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

37
2122
by: Eric | last post by:
There is a VB.NET critique on the following page: http://www.vb7-critique.741.com/ for those who are interested. Feel free to take a look and share your thoughts. Cheers, Eric. Ps: for those on comp.programming, this may be off topic, but I've posted there because the critique was part of a discussion in that group.
19
2565
by: TC | last post by:
Are there any good sites or forums for a web critique? I went to alt.html.critique and it's pretty dead.
2
421
by: Rv5 | last post by:
Let me start out by saying this is actually c++ code, but I couldn't get anyone on the c++ newsgroup to respond, and Id really like opinions. The code works fine, so Im not looking for syntax help. Im more interested in general programming practice and style critiques. I think it is good code, but Ive said that and been wrong before. Despite it not being pure C, Im hoping someone can still help me. One thing to keep in mind if you do...
8
1691
by: G Patel | last post by:
I wrote the following program to remove C89 type comments from stdin and send it to stdout (as per exercise in K&R2) and it works but I was hoping more experienced programmer would critique the layout/style/etc. Any comments will be helpful. Thank you. /* **************************************************** C89/90 COMMENT REMOVER
188
7303
by: christopher diggins | last post by:
I have posted a C# critique at http://www.heron-language.com/c-sharp-critique.html. To summarize I bring up the following issues : - unsafe code - attributes - garbage collection - non-deterministic destructors - Objects can't exist on the stack - Type / Reference Types
26
2116
by: JB | last post by:
Hi All, This is my first go at a pure CSS web site and I'd like your comments and suggestions please. The URL is http://www.waukeshapumps.com/ Comments on CSS, design and content very welcome. Thanks in advance,
2
1127
by: winston | last post by:
I wrote a Python program (103 lines, below) to download developer data from SourceForge for research about social networks. Please critique the code and let me know how to improve it. An example use of the program: promptpython download.py 1 240000 The above command downloads data for the projects with IDs between 1
2
1324
by: matt | last post by:
this is my first program in this language ever (besides 'hello world'), can i get a code critique, please? it's purpose is to read through an input file character by character and tally the occurrence of each input character. it seems to compile and run, so i'm looking for the opinions of old-timers here plz. /* * File: occurrenceTally.cpp * Author: matthew *
0
9957
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10771
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10434
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9593
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7988
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7143
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5810
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6011
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3245
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.