This evening when I skimmed google news, I saw Alberto the dragon!
Tuesday, May 22, 2012
I do not understand the "moral argument" concept.
I do not understand the concept of a "moral argument" because morality is relative. If I were in Afganistan, there could be a moral argument for Islamic law because morality is based upon culture and concepts. What is "fair" seems to be relative as well.
I see world yelling "why cannot I have nice things?", but I would guess that "nice" changes. I am sure that a can of beans would be nice to a North Korean.
I think that the only true moral, moral argument, is to not have morality that forces behavior on others.
I see world yelling "why cannot I have nice things?", but I would guess that "nice" changes. I am sure that a can of beans would be nice to a North Korean.
I think that the only true moral, moral argument, is to not have morality that forces behavior on others.
Sunday, May 20, 2012
C Preprocessor Directives
I had a bug, and I knew it was syntax. I compile my C code so that all warnings are errors to try to mitigate this class of problem, but it never works. I decided that I would change how I behave using preprocessor directives. Firstly, I must say that IBM has great preprocessor documentation in every language that one could speak, but that's not necessary.
Let's start with my problem and my line of code:
I define my logical AND through a MACRO:
if((variable & 0x40000000)!=0){;;}
so that I never have that mistake again.
Let's start with my problem and my line of code:
if((variable && 0x40000000)!=0){;;}Variable was not supposed to have a comparison && in it. It was supposed to be:
if((variable & 0x40000000)!=0){;;}The problem is that my fingers have habits and I do '&&' more than '&'. That line of code took about 4 hours to track down. :( I now have changed my behavior so that it never happens again. The new line is uses C preprocessor directives.
I define my logical AND through a MACRO:
#define _LAND(arg1,arg2) (arg1 & arg2)I now use it as I would a function in my IF statement:
if(_LAND(variable,0x40000000)!=0){;;}that results in this code upon compile:
if((variable & 0x40000000)!=0){;;}
so that I never have that mistake again.
Friday, May 18, 2012
Americans and their funny laws.
I have never understood why Americans want to govern the world. As far as law, and American can be prosecuted for a crime overseas where it may not be a crime. I find this the same as the Taliban having a trial for a woman back in Afganistan who recently went to New York and walked the streets alone.
I saw this about giving up citizenship due to tax liabilities and I completely understand. The answer is simplicity. If you want people to follow the law, remove complexity. "Fair" is relative, because what is fair for one is not fair for others. How about firing 95% of the IRS and having a 15% flat tax? No reason to flee if everyone is the same.
Here is the US Constitution and the Amendments, which I have read. I see no provisions for anything that would not treat citizens equally.
Perhaps it is time to completely through out every law and start over. The Japanese did it at WWII and it seems to have worked, but the Japanese were completely defeated.
Perhaps with debt, complexity, and some skewed desire for "fairness", the USA should declare defeat and start from scratch with the laws.
One note about the US Constitution is that I believe it to be a superior document due to flexibility; whereas, the EU Constitution is just...confusing.
I saw this about giving up citizenship due to tax liabilities and I completely understand. The answer is simplicity. If you want people to follow the law, remove complexity. "Fair" is relative, because what is fair for one is not fair for others. How about firing 95% of the IRS and having a 15% flat tax? No reason to flee if everyone is the same.
Here is the US Constitution and the Amendments, which I have read. I see no provisions for anything that would not treat citizens equally.
Perhaps it is time to completely through out every law and start over. The Japanese did it at WWII and it seems to have worked, but the Japanese were completely defeated.
Perhaps with debt, complexity, and some skewed desire for "fairness", the USA should declare defeat and start from scratch with the laws.
One note about the US Constitution is that I believe it to be a superior document due to flexibility; whereas, the EU Constitution is just...confusing.
Thursday, May 17, 2012
Makefile and defines with a value.
Have you ever wanted to change some code without changing the code? I did this in the Makefile. I did this with a define from the compiler command line. A subset of the Makefiles follows:
<makefile>
# this is the top of the Makefile. I put switches here.
# comment out PRODVER if you want the original
PRODVER := MODIFIED
#MODIFIED Threshold for lower bounds
MODIFIED_THRESHOLD :=30000
#...
CFLAGS = -Wall -mlong-calls -ffunction-sections
ifeq ($(PRODVER),MODIFIED)
CFLAGS += -DMODIFIED=$(MODIFIED_THRESHOLD)
endif
CFLAGS += $(OPTIMIZATION) $(INCLUDES)
</makefile>
The Makefile makes the same thing as:
#define MODIFIED 30000
but it does it as -DMODIFIED=30000 when the line is passed to gcc.
I want to set the minimum value of bounds
The C code looks like this:
<main.c>
/*This is the modification the code based on code from the makefile*/
#ifdef MODIFIED //this is defined in the Makefile
if(bounds < MODIFIED) //for our current Makefile, this will become (bounds<30000)
{
bounds=MODIFIED; //this sets the minimum value to be whatever is in the makefile.
} //this line turns into bounds=30000;
#endif
</main.c>
Thursday, May 10, 2012
Entropy
Entropy is the energy in a system. If you want to add energy to an existing system, you must increase it from an external source. I modeled employment as entropy at one point, which I liked. This audio link is basically about entropy and employment. If you cannot add external energy, you cannot increase the entropy of the system. http://itunes.apple.com/us/podcast/job-killers-03.29.12/id330304186?i=112448960 I just wish someone would call it entropy. :/
Subscribe to:
Posts (Atom)