User Tools

Site Tools


notes:datacomm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
notes:datacomm [2018/09/20 18:27] – [Morse Code Fun (Mcf0)?] bstrong2notes:datacomm [2018/11/14 20:07] (current) – [Mcf1?] bstrong2
Line 10: Line 10:
 Since our getting started plan is learning some python, generally the first project that you do is making the "Hello, World!" program, that is probably where we should start :P. Since our getting started plan is learning some python, generally the first project that you do is making the "Hello, World!" program, that is probably where we should start :P.
  
-======Morse Code Fun (Mcf0)?======+======Morse Code Fun (Mcf0) Due October 17th======
 **morse code sender/receiver:** **morse code sender/receiver:**
  
Line 23: Line 23:
 ^^^ totally not copied from Wikipedia... Basically it's a way of communication through sound using long and short sounds called dits(short sounds) and dahs(long sounds).  ^^^ totally not copied from Wikipedia... Basically it's a way of communication through sound using long and short sounds called dits(short sounds) and dahs(long sounds). 
  
-**Well okay what does this program need to do?** 
  
-First thing we need to come up with a way to express our dits and dahs (that way we can use each others programs to encode/decode morse code). How about we use "." for dits, and "-" for dahs. For spaces how about we use "|"... Open to suggestions on that :P. +**How much functionality should the program have?**
-So our encoder should be able to convert text into the dits and dahs, and our decoder should convert dits and dahs to text. +
  
-encoder ex:+The program shall be able to recognize these letters 
 +  * **[A-Z]** 
 +  * **Comma: ---...** 
 +  * **Equals: -...-** 
 +  * **Period (also called full stop): .-.-.-** 
 +  * **Question mark: ..--..** 
 +  * **AA new line (\n): .-.-** 
 +  * **AR end of message (EOF): .-.-.**
  
-  * encoder --> . -. -.-. --- -.. . .-. 
-  * enc oder --> . -. -.-. | --- -.. . .-. 
  
-decode ex:+**Well okay what does this program need to do?**
  
-  * -. -.-. --- -.. . .-. --> encoder +First thing we need to come up with a way to express our dits and dahs (that way we can use each others programs to encode/decode morse code). **We shall use "." for dits, and "-" for dahsFor spaces how about we use " "**... Open to suggestions on that :P. 
-  * . -. -.-. --- -.. . .---> enc oder+So our encoder should be able to convert text into the dits and dahs, and our decoder should convert dits and dahs to text.
  
-It might be a good idea to use more than one space between each letter separation... What do you guys think?+encoder ex:
  
-**How much functionality should the program have?**+  $ ./encode <<< "encoder" --> . -. -.-. --- -.. . .-. .-.- .-.-. 
 +  $ ./encode <<< "enc oder" --> . -. -.-. | --- -.. . .-. .-.- .-.-. 
 +  $ ./encode <<< "hello" --> .... . .-.. .-.. --- .-.- .-.-. 
 +         
 +decode ex:
  
-This meaning should we only have the program go from A-Z or include special characters (things like ! , . /)?+  * $ ./decode «< “. -. -.-. --- -.. . .-. .-.- .-.-." --> encoder 
 +  * $ ./decode «< “. -. -.-. | --- -.. . .-. .-.- .-.-." --> enc oder 
 +  * $ ./encode <<< "hello" | ./decode --> hello 
 +      
  
 **Should we have the program accept the augments in argv, or use input?** **Should we have the program accept the augments in argv, or use input?**
  
-This probably doesn't matter that muchbut generally our lord has us use argvSo is using argv for the input okay with everyone?+Quote from our lord: "Accepting input  from STDIN,  sending results to  STDOUT. That  way we'll 
 +know  if  we have  that  logic  in place before  we  explore any  other 
 +communication scenarios."  
 + 
 + 
 +**If one desires, there is an opportunity to get some nice testing scripts up and going** 
 +Yet another quote from our lord again: "Also, there are opportunities to  write evaluation scripts and whatnot to 
 +really give our encoders/decoders a stress test to make sure they process 
 +information accordingly."
  
-**Anything else that anyone can think of that this program should have?**+======EOCE====== 
 +Well looks like the EOCE'have been launched! May everyone do their best on it! Good luck to all :D
 ======URLs====== ======URLs======
 Pythons built in functions: Pythons built in functions:
Line 61: Line 80:
 How does one start programming on lab46? How does one start programming on lab46?
  
-There might be a different way, but this is what i'm doing... So if you add this line to the file that you intend to program in, then you're all good to start programming in thee dank python. **#!/usr/bin/env python**, so all you would need to do is make the file executable, and run it whenever you want to execute your program.+There might be a different way, but this is what i'm doing... So if you add this line to the file that you intend to program in, then you're all good to start programming in thee dank python. **#!/usr/bin/python3**, so all you would need to do is make the file executable, and run it whenever you want to execute your program. Just a note, we have decided to use python3 for our programming adventures, so make sure that you are using that, and not python2.
  
 Another way to run a Python Program is to simply include the command python before your script. Another way to run a Python Program is to simply include the command python before your script.
notes/datacomm.1537482431.txt.gz · Last modified: 2018/09/20 18:27 by bstrong2