Non-constant constant strings

I

Ian Collins

Richard said:
You dont need to justify yourself. You're human. So is Ian. It's how he's
picked up these awful c.l.c airs of grandeur : too few people willing to
say "STFU and stop talking nonsense".

I was trying to help, I'm not sure where you get "airs of grandeur"
from. It looks like Rick makes the same kind of coding errors I do.
I've found coding to pass tests to be the best way of spotting them.

Maybe you could help sometime rather than sniping?
 
R

Rick C. Hodgin

That is not the meaning in this context. Libre is French for free.
See: http://www.flossproject.org

The word "free" in this context relates to liberty, not price. "Think
free speech, not free beer."

See: http://en.wikipedia.org/wiki/Gratis_versus_libre

"Libre /ˈliËbrÉ™/ in English is adopted from the various
Romance languages, ultimately descending from the Latin
word lībere; its origin is closely related to liberty."

Best regards,
Rick C. Hodgin
 
G

glen herrmannsfeldt

(snip, someone wrote)
I remember designing and building computer circuits (microprocessor, memory,
logic etc) without using an oscilloscope, because I didn't have one. You
just use different approaches. (Later I did use analog non-storage scopes,
and you just developed techniques for using these with digital circuits. I
did have a multimeter, but you can appreciate that they are not very useful
for signals switching millions of times every second.)
And I've never used a debugger either. Again, bugs do still get fixed.
Usually the sort that a debugger wouldn't have been very useful
for tracking down anyway (because the symptom is billions of
instructions away from the cause.)

Well, not completely useless. If you know the average level of a
signal, that is sometimes pretty useful. Sometimes knowing that it
changes at all is useful. Now, VTVM give peak-to-peak which helps
less than RMS or average of the rectified value (usual analog VOM).

Also, the higher frequency oscilloscopes are a lot more expensive,
so sometimes you debug with a cheaper one.

-- glen
 
K

Kaz Kylheku

The ones every couple of weeks are ones I don't catch easily during the
development process. It's because, for example, I meant in my head to
type the variable "foo" but instead I typed the variable "i" because I
was thinking ahead to my next for loop.

I recently closed a <pre> tag in some HTML with </post>. Oops! :)
 
B

BartC

Rick C. Hodgin said:
I had no intention of continuing development in assembly even back in the
early 2000s. I began working on what I called at that time q/Language,
which was a combination Microsoft Macro Assembler-compatible assembler, as
well as a C-like language. I intended to do all of my future development
in that language, but I never had time to develop it.

Hey, I used 'Q' for one of my languages! That also combined a not-quite-C
(more C-equivalent) language and, in my case, NASM-compatible inline
assembler.

And I did use it all the time when I wasn't using my dynamic/interpreted
language. (Actually, this is how you will really improve your productivity;
forget using even C for GUIs, and use a 'soft' language instead.)

(However, maintaining your own compiled language, compiler etc is a lot of
effort, as you've probably found, so now I use C, but I need to use it via
syntax wrappers to make it comfortable for me. I've been using a thin
wrapper, now I'm creating a much thicker one, but I'm still programming C -
sort of.

And I still use ASM but only when I need the extra speed (naturally, with
its own thin wrapper), but now it has to be as a separate module because
inline ASM with C is full of problems (and gcc have anyway done a good job
of making it inline ASM next to impossible to use through complexity).)
 
B

BartC

glen herrmannsfeldt said:
(snip, someone wrote)
Well, not completely useless. If you know the average level of a
signal, that is sometimes pretty useful. Sometimes knowing that it
changes at all is useful. Now, VTVM give peak-to-peak which helps
less than RMS or average of the rectified value (usual analog VOM).

(That's sort of true: if a signal is 0V or 5V when static, and 2 or 3V when
it runs, then something is happening (or there's a short-circuit). But LEDs
give a good indication too, and a rapidly flipped mirror can sometimes show
the slower signals. I'd also tried feeding a signal into the video input of
a TV, which will give an unsynchronised display but can give useful clues.
Also, the higher frequency oscilloscopes are a lot more expensive,
so sometimes you debug with a cheaper one.

It was getting the thing to display a one-time sequence of pulses that was
the main problem. I sometimes pulsed the /reset signal with, say, a 20kHz
square wave, and used that for the timebase. Then I could examine the first
few instruction cycles easily because they were being repeated.)
 
R

Rick C. Hodgin

And I still use ASM but only when I need the extra speed (naturally, with
its own thin wrapper), but now it has to be as a separate module because
inline ASM with C is full of problems (and gcc have anyway done a good job
of making it inline ASM next to impossible to use through complexity).)

I haven't done much assembly programming in the last five years. I did
completely my 32-bit disassembler, which was the conversion of this code
from assembly in Exodus to a C-based system:

https://github.com/RickCHodgin/libsf-full/blob/master/_exodus/source/x86/disasm.asp

And I've done test things and what have you, but nothing major. I still
use "_asm int 3" in my code for hard breakpoints, and "_asm nop" with a
breakpoint set for soft breakpoints. :)

Best regards,
Rick C. Hodgin
 
D

David Brown

RMS has made some statements on sexuality that most people would find
(at least) a bit over the top.

http://en.wikiquote.org/wiki/Richard_Stallman#On_sex

Well, I think what consenting adults do in private is up to them, and
some activities that are taboo in our society are/were perfectly
acceptable in others (and thus you might argue that any "harm" involved
is due to society rather than the acts in question). But I believe you
are right that most people would find some of his points rather extreme.
Most people would, I think, just think "he's weird" and ignore
anything more he says on the subject.

However, as far as I know his views here have no bearing on the GNU
project, the FSF, or any software, so I don't seem them as relevant to
using or supporting said software. If he had been actively campaigning
to promote some of the more questionable activities (and if such
campaigning were making a real difference to anyone), it might be a
little different.
 
R

Rick C. Hodgin

Well, I think what consenting adults do in private is up to them, and
some activities that are taboo in our society are/were perfectly
acceptable in others (and thus you might argue that any "harm" involved
is due to society rather than the acts in question). But I believe you
are right that most people would find some of his points rather extreme.
Most people would, I think, just think "he's weird" and ignore
anything more he says on the subject.

However, as far as I know his views here have no bearing on the GNU
project, the FSF, or any software, so I don't seem them as relevant to
using or supporting said software. If he had been actively campaigning
to promote some of the more questionable activities (and if such
campaigning were making a real difference to anyone), it might be a
little different.

David, you believe this way because you are being deceived by an evil
spirit, Satan, who is leading you astray. He is using his spiritual
influence to guide your mind into believing all manner of false things,
such as these things which are harmful and contrary to God's teachings.

When a man is drawn by God to His Son, Jesus Christ, God gives that man
the ability to hear His Holy Spirit voice, which leads men to truth. I
cannot explain why God does this for some people ... but He does.

I used to be a God-hating, espoused atheist. I was involved with all
manner of sinful activity, sexual and otherwise. I was drawn to His
Son in 2004 and I was changed from the inside out. I am not the same
man I was back then, and there's just no other way to put that.

When God gives man an ability to hear His voice, they hear His Holy Spirit.
Unlike the enemy, this spirit is the spirit of truth, and only truth, which
is God's truth being as He is the creator, author, and upholder of all
things simultaneously (it's all based upon truth, the foundation upon which
all things everywhere exist).

This spirit is called the "Holy Spirit" because it is just that: holy.
Until that time, we are spiritually dead and can only understand the
things our flesh can understand, and until we are drawn to God we only
hear the enemy's lying voice.

When a man is drawn to God, he is born again and is changed from the inside
out. This is the rebirth, and it is that thing which enables a man to no
longer go the way of the world, but instead to hear and follow God in all
of his ways. I could never have done this on my own, because as a man in
the flesh, I hated God. I wanted nothing of His holiness in my life. It
was due to no pursuit of my own, no reading and studying of my own, of
nothing that I did on my own, that changed me from within. The truth is, I
was along for the ride. It was an act of God to give new life into a dead
soul like me.

This is my testimony. For those who are born again, no explanation is
necessary regarding what it was that transpired within me. For those who
are not born again, no explanation will ever be sufficient. I offer this
information to you and others as a witness that the saving power of Jesus
Christ is real, that the Holy Spirit drawing is real, and that God the
Father really is in control of all things.

Best regards,
Rick C. Hodgin
 
G

Geoff

(snip, someone wrote)



Well, not completely useless. If you know the average level of a
signal, that is sometimes pretty useful. Sometimes knowing that it
changes at all is useful. Now, VTVM give peak-to-peak which helps
less than RMS or average of the rectified value (usual analog VOM).

Also, the higher frequency oscilloscopes are a lot more expensive,
so sometimes you debug with a cheaper one.

In 1982 I designed, built, debugged and tested a Z80 based
microcontroller on two boards with a TRS-80 Model I computer for a
development system with Microsoft's EDTASM for an assembler. I burned
the code into EPROM and tested the system with a Fluke model 77 DVM, a
Tektronix scope and a logic probe. It was fun, educational and not
very cost-effective. I did the same thing pretty much concurrently
with an RCA 1802 CMOS processor and a bunch of glue logic. Those days
are long gone. These days it's debuggers, state analyzers and
in-circuit emulators by necessity.
 
I

Ian Collins

Rick said:
Are you suggesting I write a unit test (or unit tests) before I even have
the algorithm I'll be testing coded or debugged?

Yes. Writing tests (code) is easy. Debugging is hard!
I create my algorithms, debug them, and once they are working I code tests
for them that use input and expect certain output.

Why can't you write the tests first?
 
R

Rick C. Hodgin

Yes. Writing tests (code) is easy. Debugging is hard!

I disagree. I've found writing proper tests to be a bit of a time
consuming chore.
Why can't you write the tests first?

It seems backwards. I test the algorithms as I develop them (which I
actually find to be a significantly easier task of the two -- development,
and testing), and then write tests after.

The tests I write are more to ensure that as I move forward, patches to
the OS, new service packs being released, whatever, that things continue
to work as they did when I completed the algorithm. When I am making
changes to code I usually have mental ownership of the change I'm making,
and therefore I have an encompassed view of the impact of the change.
It is rare that I break anything on normal additions and maintenance.
I've just completed a major refactoring of moving multiple functions
from my VVMOSS module over to the VVM module. In these cases, it would've
been beneficial to have more automated testing. However, this is not
something that would normally be done. Had I been paying more attention
during various aspects of development, it would not have been needed at
this time either.

Best regards,
Rick C. Hodgin
 
I

Ian Collins

Rick said:
I disagree. I've found writing proper tests to be a bit of a time
consuming chore.

It generally is a chore when you write them after the fact. The value
of the tests is also diminished because they are only useful for
regression testing. By the time the code is "tested", most programmers
are ready to move on, so naturally writing retrospective tests is seen
as a chore and often done poorly and seldom done thoroughly.

When written first, the tests save you debugging time, help you drive
the design and stop you writing unnecessary code (you only write code to
pass the tests). It also enables you to refactor you code as you go,
knowing the changes haven't altered the behaviour.
It seems backwards.

It often does at first, but like anything else, once you get used to it
you won't change back.
 
R

Rick C. Hodgin

It generally is a chore when you write them after the fact. The value
of the tests is also diminished because they are only useful for
regression testing. By the time the code is "tested", most programmers
are ready to move on, so naturally writing retrospective tests is seen
as a chore and often done poorly and seldom done thoroughly.

When written first, the tests save you debugging time, help you drive
the design and stop you writing unnecessary code (you only write code to
pass the tests). It also enables you to refactor you code as you go,
knowing the changes haven't altered the behaviour.

When I am designing my personal systems, I have a particular goals in mind.
I look at things from the user's point of view, and do whatever is required
in code to make that thing happen. I will often spend an excessive amount
of time writing additional code to achieve some goal I have in mind for the
user experience.
It often does at first, but like anything else, once you get used to it
you won't change back.

I've tried writing various types of unit tests throughout my career. It's
not something I've ever found much value in. Perhaps I've been doing it
wrong. The tests I'm writing for the VVM relate to crucial components upon
which the entire system relies, such as my binary xml engine, which is used
for pretty much everything in the RDC and Visual FreePro.

Best regards,
Rick C. Hodgin
 
S

Stephen Sprunk

Are you suggesting I write a unit test (or unit tests) before I even
have the algorithm I'll be testing coded or debugged?

This sounds like "test-driven development", which is popular in many
circles. AIUI, the basic idea is that you start by writing unit tests
to check whether the software complies with the specified requirements,
and then you code and debug the actual software until it passes those
tests, which (if done correctly) means you're done.

S
 
D

David Brown

David, you believe this way because you are being deceived by an evil
spirit, Satan, who is leading you astray. He is using his spiritual
influence to guide your mind into believing all manner of false things,
such as these things which are harmful and contrary to God's teachings.

<snip snivelling drivel>

I believe RMS's ideas on what is and is not acceptable for sex has no
bearing on GNU software because it is a completely different thing. It
is no more relevant than his haircut (or lack thereof), which is
probably also against the rules found in your favourite book.

I note you are quite happy to copy his ideas and the GPL without fear of
eternal damnation. Why then should I not get to use software from the FSF?
 
B

BartC

[Allowing trailing commas in lists]
It's nice. It's useful. And I regularly swear that JavaScript doesn't
support it. I actually use it in hand-maintained code as well - if
I've got a list of things why do I have to do something special to the
line above if I'm adding an item between it and the closing brace but
not anywhere else in the list?

You can say the same about a few other things in C:

- If you have a branch of an if-statement etc containing one statement, and
wanted to add another, then you have mess about with adding braces. (And
mess about again removing them when the statement count drops to one, if you
have a style that uses the minimum number of braces.)

- Adding an item at the end of a parameter list, for example (which can also
be written one per line), you have exactly the same issue.

- When you have the sequence if (a)-elseif (b)-elseif (c)..., and want to
add some test before the (a), or want to remove the (a) test, or rearrange
the tests, then there is also considerably more re-editing to do than adding
or removing a comma.

- Etc.

So you might find it useful, but for hand-writing code there isn't much of
an argument for it without being more flexible in lots of other areas at the
same time.
 
R

Rick C. Hodgin

I note you are quite happy to copy his ideas and the GPL without fear of
eternal damnation.

The idea of free/libre software is a correct one. It relates back to what
God gave us in the way of the things of His creation. He gave us apples,
with seeds inside, each of which can grow a new apple tree. He gave those
who receive the product the ability to also replicate what they received.
That is the general philosophy of what free/libre software is.

Where it becomes harmful is when it originates not from the place of its
true source, but from some other place. Jesus is the author of all things.
All things everywhere in the universe were made by and through Him. As
such, all things must be founded upon Him. If they are not, then they are,
by definition, founded upon something else ... and that "something else"
will never stand.
Why then should I not get to use software from the FSF?

I also use GCC, and the many features around the Linux kernel in my OS as
well. The difference is I do not intend to use them forever, but until
such time as I am able to write the alternative, at which time I will
switch away and never look back. Until that time, I have to begin where I
am able. It's the same with our witness here on Earth. Heaven is our
eternal destination. But until such time as God calls us Home into
eternity, we will be here upon this sinful Earth, continually subjected
to all manner of sinful things in every regard. Yet God gives us Grace
to be here. And His Grace is sufficient. :)

Best regards,
Rick C. Hodgin
 
R

Rick C. Hodgin

I also use GCC, and the many features around the Linux kernel in my
OS as well.

When I say "my OS as well" I mean the OS I currently have installed on my
machine. I do not use any of those features in Exodus, nor will I in
Armodus. They are entirely new creations literally written from the
ground up.

Best regards,
Rick C. Hodgin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,077
Messages
2,570,566
Members
47,202
Latest member
misc.

Latest Threads

Top