"Off Topic" Code Discussion from Q8 Thread.. (code discussion not related to the Q8)

39 posts / 0 new
Last post

Pages

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama
"Off Topic" Code Discussion from Q8 Thread.. (code discussion not related to the Q8)

I dub this the Official “Off Topic” Code Discussion Thread for Code discussion not related to the Q8.

Code discussion & info is very interesting…… even to the uninformed such as myself (to me anyway).
It would be a shame if it were buried in the Q8 thread… never to be seen or found again most likely. Facepalm

So here is a platform to let it all hang out, thus promoting & preserving solidarity in & on the Q8 Info Thread

Hopefully there will be more participation here than on the Off Topic Q8 Automobile Thread… Daily Driver vs. Street Car

Let the posting begin………… Thumbs Up
.

I think that is all for now.
Thank you for reading, and
have a nice day.

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

Joey Adams
Offline
Last seen: 1 month 1 week ago
Joined: 02/12/2017 - 21:29
Posts: 376
Location: Jamestown, KY

Lol this cracked me up teacher

Mr.Scott
Offline
Last seen: 4 months 1 week ago
Joined: 02/13/2016 - 00:26
Posts: 850

10 PRINT "HELLO WORLD"

Mr.Scott
Offline
Last seen: 4 months 1 week ago
Joined: 02/13/2016 - 00:26
Posts: 850

echo "Hello world!"

Mr.Scott
Offline
Last seen: 4 months 1 week ago
Joined: 02/13/2016 - 00:26
Posts: 850

#include <stdio.h>

int main(void)
{
    printf("Hello world!\n");
    return 0;
}

Mr.Scott
Offline
Last seen: 4 months 1 week ago
Joined: 02/13/2016 - 00:26
Posts: 850

#include <cstdlib>
#include <iostream>

using namespace std;

int main ( int argc, char *argv[] );
int main ( int argc, char *argv[] )
{
  cout << "Hello world!\n";

  return 0;
}

Mr.Scott
Offline
Last seen: 4 months 1 week ago
Joined: 02/13/2016 - 00:26
Posts: 850

        program main

        implicit none

        write ( *, '(a)' ) ' Hello, world!'

        stop

        end

Mr.Scott
Offline
Last seen: 4 months 1 week ago
Joined: 02/13/2016 - 00:26
Posts: 850

def hello():

    print("{:s} {:s}!".format('Hello', 'world') )

    return

 

if ( __name__ == '__main__' ):

    hello ( )

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama

Joey Adams wrote:
Lol this cracked me up teacher
Shocked ….. Why Joey, I am shocked & dumbfounded at your reaction…. I have even teared up. See… Crying

Do you feel proud you brute?? Facepalm

I would mark your post RUDE…. but alas, after the trials & tribulations of just trying to survive out here in “Dark Territory” the last few days…… I cannot even work up the energy or desire to even locate the dreaded Rude button, much less click it.
.
.
Wink

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama
Shocked .. Do those come with instructions for dummies Mr. Scott?? Wink

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

Joey Adams
Offline
Last seen: 1 month 1 week ago
Joined: 02/12/2017 - 21:29
Posts: 376
Location: Jamestown, KY

I hope so because I’m clueless as well teacher. Mr. Scott your coding has flew right over my head, sadly this is not too difficult when computer language code is involved!

Yokiamy
Yokiamy's picture
Offline
Last seen: 10 hours 32 min ago
Joined: 10/18/2016 - 15:47
Posts: 3141
Location: Netherlands
Mr.Scott wrote:

#include <stdio.h>

int main(void)
{
    printf(“Hello world!\n”);
    return 0;
}

Good old C, that is some time ago for me!

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama

Hey JA, I found this…. Coding For Dummies
….it might have some answers in it. I don’t know enough to even have a clue. Facepalm

The title even seems above me, but I looked; there was no “Coding for Stupid People”, so i guess this will have to do. Wink

I don’t care about being able to control the Space Shuttle or anything like that. But I’d like to know a few basics….. very simple basics at that …… of how it works and why. Since I know exactly O (zero) about it. Wink
And at the moment I have a bit of time to devote to reading up.

I am gonna see if the Library has it and I’ll let you know.


Coding For Dummies

  • Coding For Dummies, was previously published as Coding For Dummies,. While this version features a new Dummies cover and design, the content is the same as the prior release and should not be considered a new or updated product. Hands-on exercises help you learn to code like a pro No coding experience is required for Coding For Dummies, your one-stop guide to building a foundation of knowledge in writing computer code for web, application, and software development. It doesn’t matter if you’ve dabbled in coding or never written a line of code, this book guides you through the basics. Using foundational web development languages like HTML, CSS, and JavaScript, it explains in plain English how coding works and why it’s needed. Online exercises developed by Codecademy, a leading online code training site, help hone coding skills and demonstrate results as you practice. The site provides an environment where you can try out tutorials built into the text and see the actual output from your coding. You’ll also gain access to end-of-chapter challenges to apply newly acquired skills to a less-defined assignment. So what are you waiting for? The current demand for workers with coding and computer science skills far exceeds the supply Teaches the foundations of web development languages in an easy-to-understand format Offers unprecedented opportunities to practice basic coding languages Readers can access online hands-on exercises and end-of-chapter assessments that develop and test their new-found skills If you’re a student looking for an introduction to the basic concepts of coding or a professional looking to add new skills, Coding For Dummies has you covered.

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

Yokiamy
Yokiamy's picture
Offline
Last seen: 10 hours 32 min ago
Joined: 10/18/2016 - 15:47
Posts: 3141
Location: Netherlands

Teacher, from your posts the last couple of days, you seem to be a little agitated, how come?

A friend of me always tells me when im irritated “put on your [imaginary] teflon coat, nothing will attach to it and everything just glides off”

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama

Yokiamy wrote:
Teacher, from your posts the last couple of days, you seem to be a little agitated, how come?

A friend of me always tells me when im irritated “put on your [imaginary] teflon coat, nothing will attach to it and everything just glides off”

Thanks Yokiamy, I like that….. Wink … Imaginary Teflon coat. Beer
But honestly, I’m not agitated at all…. seriously.

Some of my opinions have differed from some other peoples is pretty much the bottom line.
Someone & a few more have been marking everything I post as RUDE ( this post will most likely even be marked Rude IF things continue as they have been. Big Smile )
But hey… I am good with that. As I am typing this my RUDE score just reached 30 0f 10 …… Big Smile
To me that is utterly ridiculous as well as laughable……. Wink

Heck, go back and read what I have posted. You will be hard pressed to find anything at all RUDE in it. Differing opinions yeah, but as far as I know a differing opinion is not rude. Smile

When I have said something I have said it in a straight forward manner so as to be crystal clear about where I stood and what I thought.
I think some people like the watered down version of things where it is sugar coated & all pc…. fine.
They won’t find it from me however, I say just call a spade a spade and lets the chips fall where they do.

And trust me, I am not saying I am perfect at all…. cause I am sure not, BUT this has reached the stage of extreme humor at this point. Big Smile

Yeah, now I had been joking around about Dark Territory; as to make a joke about every single post I made getiing marker Rude for a couple of days. Because to me…. that is exactly what that was and is……….. a joke.

Anyway, that’s all. I’m good honestly, and thank you for asking. I have just a little less than zero actual stress or agitation about anything that goes on here. There are much more important things to consider at the moment. Wink

Take care……… Thumbs Up

Oh yeah, this is long; but you asked. Big Smile

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

hIKARInoob
hIKARInoob's picture
Offline
Last seen: 7 hours 5 min ago
Joined: 08/28/2016 - 08:15
Posts: 4191

Well, let’s toast to that then. Today I have a glass of red wine though. Cheers! :WINE:

^^^ I wonder what will happen if I type :WINE:

(edit: dangit, no picture of a glass of wine showing up, like it does with beer. Well, I learned something about a code-thingy then)

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama

hIKARInoob wrote:
Well, let’s toast to that then. Today I have a glass of red wine though. Cheers! :WINE:

^^^ I wonder what will happen if I type :WINE:

(edit: dangit, no picture of a glass of wine showing up, like it does with beer. Well, I learned something about a code-thingy then)

Big Smile …. Amen brother!!!!! Thumbs Up

Here… beer mugs will have to do……….. Beer Beer Beer Beer Beer

Probably a little “Off Topic”….. but oh well, I started the thread so all is well. Wink

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama

My sincerest apologies to you Yokiamy.
It does appear that my reply to you, in Post #15 above; was indeed consider rude by at least one person…. so far.

Sorry, I was just trying to answer your question. Facepalm

I’ll go sit in the corner for a few hours now……………

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

Joey Adams
Offline
Last seen: 1 month 1 week ago
Joined: 02/12/2017 - 21:29
Posts: 376
Location: Jamestown, KY

Haha thanks Teacher, yea coding for stupid people would probably be more up my alley as well!

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama

I hear ya’ JA. Big Smile

I am going to the Library & check it out if they have it…. just to see IF I can learn to do anything….. anything at all. Big “IF” but as long as I don’t screw up my ‘pooter’… I’m good with trying to do something. Wink

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

Mr.Scott
Offline
Last seen: 4 months 1 week ago
Joined: 02/13/2016 - 00:26
Posts: 850

#include <stdio.h>

static char hello_world[] = {
     0x48, 0x45, 0x09, 0x24, 0x2a,
     0x66, 0x36, 0x23, 0x36, 0x2b,
     0x2f, 0x66, 0x32, 0x23, 0x35,
     0x36, 0x6d, 0x4c, 0x48, 0x4c
};
static char blf[] = "BLF";

int main(void)
{
        int x, l;

        l = sizeof( hello_world );
        for( x=0; x<l; x++) { printf("%c", ((hello_world[x]^blf[x%3]) & 0xff) ); }

        return 0;
}

Yokiamy
Yokiamy's picture
Offline
Last seen: 10 hours 32 min ago
Joined: 10/18/2016 - 15:47
Posts: 3141
Location: Netherlands

Maybe people dont know the difference anymore nowadays between RUDE and the dislike of your opinion.
They give negative credits as it were hot baquettes Smile

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama

Yokiamy wrote:
Maybe people dont know the difference anymore nowadays between RUDE and the dislike of your opinion.
They give negative credits as it were hot baquettes Smile
Big Smile …… That may very well be Yokiamy. Thumbs Up
At this point it is so pathetic it is actually comical…. Wink
In my personal opinion of course…….

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

amplificus
amplificus's picture
Offline
Last seen: 10 months 2 weeks ago
Joined: 12/10/2015 - 10:58
Posts: 100
Location: SoCal

@Teacher

I think that you might like learning the Python programming language. Interestingly, it is actually called “Python” in tribute to Monty Python, and you can see a lot of references to the various works in the programming. There are a lot of free tutorials online, and is a really good first language to learn since it is considered much easier to read than other languages that use lots of symbols.

Here is one of the many free classes: https://www.datacamp.com/courses/intro-to-python-for-data-science/?utm_s...

Have you heard of the arduino? For a person new to programming and circuits, THAT is the place to go.

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama

amplificus wrote:
@Teacher

I think that you might like learning the Python programming language. Interestingly, it is actually called “Python” in tribute to Monty Python, and you can see a lot of references to the various works in the programming. There are a lot of free tutorials online, and is a really good first language to learn since it is considered much easier to read than other languages that use lots of symbols.

Here is one of the many free classes: https://www.datacamp.com/courses/intro-to-python-for-data-science/?utm_s...

Have you heard of the arduino? For a person new to programming and circuits, THAT is the place to go.

Thank you amplificus, I appreciate the info & link. At this point I have only had a chance to glance at “Python”…. but it appears it starts very basic (which is a good thing I would surely need)
I am certainly going to explore it in depth.

I had/have never heard of “arduino”, but I did a quick search amd came up with this….
https://www.bing.com/search?q=arduino&pc=cosp&ptag=C73AE89FD93123&form=C...

I will certainly check it out in-depth also…. because I am certainly “new to programming and circuits”….
……as in totally new. Wink

Again, thank you very much for the info and heads up. Thumbs Up
.
Smile

This is just something I have always been curious about & never had nor taken the time to explore in any way. I have a bit of time now… so why not. Smile

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

amplificus
amplificus's picture
Offline
Last seen: 10 months 2 weeks ago
Joined: 12/10/2015 - 10:58
Posts: 100
Location: SoCal

Check this one out

Honestly, the Arduino is awesome because it’s a great intro into programming and circuits, but can be used for so many things. I’ve used them for programming the MCU in flashlight driver’s to get exactly the modes i want, made a battery capacity tester for the laptop pulled 18650’s, and a variable speed fan controller for my bench LED test heatsink.

The list of what you can do with just a few lines of code is endless, and so many tutorials online make it easy. When my son is old enough to read, I’m going to push him learning to code really hard.

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama

amplificus wrote:
Check this one out

Honestly, the Arduino is awesome because it’s a great intro into programming and circuits, but can be used for so many things. I’ve used them for programming the MCU in flashlight driver’s to get exactly the modes i want, made a battery capacity tester for the laptop pulled 18650’s, and a variable speed fan controller for my bench LED test heatsink.

The list of what you can do with just a few lines of code is endless, and so many tutorials online make it easy. When my son is old enough to read, I’m going to push him learning to code really hard.

I’m not sure what the item linked to is, but I figured it importantand it is as cheap as dirt. Thumbs Up

See, that is what I have in the back of my mind… trying to learn to program flashlight driver MCU’s.
It does sound like you have done a lot of things with it…. that’s pretty neat.

I’ll take your word about this, “so many tutorials online make it easy”; and start to dig into it.

I do appreciate the info also.
It gives me hope this might not be as far out of reach as I had thought…. the basic stuff anyway. Thumbs Up

Sounds like a plan about your son also… a good plan. Looks like ‘code’ is the thing now & I am sure will be only more so in the future.

Again, I appreciate the info. Smile
Feel free to offer anything you feel is relevant to a total newbie…… Big Smile

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

amplificus
amplificus's picture
Offline
Last seen: 10 months 2 weeks ago
Joined: 12/10/2015 - 10:58
Posts: 100
Location: SoCal

Short explaination: The item linked is an arduino clone. Get one (or 3!).

Long explaination: That is a microcontroller development board, which you can plug into your computer using a usb cable, send some code onto it, and it will perform actions. The little plugs on the outside are for input/output. For example, you can attach a small LED to one of the pins and ground, and tell the controller to turn it on and off. Tutorial Here!

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama

OK….. thanks. I understand the generalities of what you said. I’ll check the tutorial out you sent the link to. Thumbs Up

I appreciate the understandable (for me) info you are communicating to, thank you. Smile

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

teacher
teacher's picture
Offline
Last seen: 2 years 5 months ago
Joined: 02/23/2016 - 19:04
Posts: 9596
Location: NE & SW Alabama

amplificus wrote:
Short explaination: The item linked is an arduino clone. Get one (or 3!).

Long explaination: That is a microcontroller development board, which you can plug into your computer using a usb cable, send some code onto it, and it will perform actions. The little plugs on the outside are for input/output. For example, you can attach a small LED to one of the pins and ground, and tell the controller to turn it on and off. Tutorial Here!

OK, I split the difference; I ordered 2… (figured I might as well have a back up. Big Smile )
…….. & even paid a bit for shipping so they might get here quicker. Wink

After reading the Tutorial you linked to, I figured there was no time to start like the present. Thumbs Up
And so, it begins…… Big Smile

You never know how a horse will pull until you hook him up to a heavy load./"Bear" Bryant 

 .................................. "Slow is Smooth, Smooth is Fast" ...................................

       Texas Lumens Flashlights / M4D M4X Deals : sign up - save $$$$  

         Rudeness Level _ mΩ _ {width:70%} _ LightWiki _ LED Tint Chart  

      Xlamp size chart _ BatteryU _ Flashaholic? Need Professional Help???            TheOriginal _ TAB _ LightSearch _ BatterySearch _ 14500's _ DiCal 

 

                                             

Yokiamy
Yokiamy's picture
Offline
Last seen: 10 hours 32 min ago
Joined: 10/18/2016 - 15:47
Posts: 3141
Location: Netherlands

Nice to see you picking up new things!

Pages