Some ideas for contributing to open source

31 views
Skip to first unread message

Eyob Fitwi

unread,
Oct 26, 2015, 6:17:05 AM10/26/15
to linux-e...@googlegroups.com
Hi guys,

We've had this group for a while now. So far we've used it to help
coordinate our open source localization efforts. Which is good. But I
always felt we were absent in the real work - actually contributing code
to open source projects. I know, not all of us are programmers. Some of
us are. Some of use need some guidance. So, I was wondering if those of
you who are fully into programming can start some small project, perhaps
on github, and coordinate or guide the rest of us. As in, give us ideas
where to practice coding, suggest what contributions we can make (ideas,
algorithm, etc), supervise our code, etc. I mean, we don't have
Ethiopian code contributors to speak off, at least not to my knowledge.
Right now I'm looking at my calendar on my desktop and I feel frustrated
that I can't add an option to display the Ethiopian calendar system, or
even know how to add code Linux to achieve that eventually.

Of course, we will have to detail our skill sets and do some
coordination, but I think it is worth the effort. What do you think?

Best regards,
Eyob

Fantaw Tesema

unread,
Oct 27, 2015, 3:25:05 PM10/27/15
to linux-e...@googlegroups.com
Good question!

As for me, I want to concentrate on the translation and testing. I hope there are programmers or script creators in this our network who can cooperate. In addition I do not have experience in scripting except a bit only the languages c++ and php back in the school long time ago.

1) You use to ask important questions! I also remember you asking something like "What do we have to show since we started using Linux"? if I remember correctly. Well, let me be silly again, I have now started to use Debian rather than second and third flavors. That is not a big deal. Any way next month, am invited to a community to show something about any thing computing which am free to show anything I like. Am planning to introduce and motivate guests the easy and elegant (from user prospective) Linux Mint (Mate). Mate is more stable than Cinnamon because Mate is from Gnome 2. I think it will be interesting. This is not a big deal again, but moving forward.

2) You also have mentioned Google translation. I do not know what happened since then, but again, for some limited time, i will only want to finish wp first. Hope others in these network will say something. BR. //FT

 





--
You received this message because you are subscribed to the Google Groups "Gnu/Linux Ethiopia" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-ethiopi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Belay Tekalign

unread,
Oct 27, 2015, 5:39:16 PM10/27/15
to Gnu/Linux Ethiopia
Hi Eyob:
As IT technology matures, the number of hard core coders is getting fewer and fewer. Companies, especially educational institutes like University of California would rather buy the software than build it in house, because it is cheaper and guaranteed. Therefore we are losing our touch. For instance in my university tech force almost the 80-90% do not work full time coding http://it.ucmerced.edu/inside-it/. We become administrators or worse trouble shooters.

Therefore I like your idea of joining Git. My subgroup used TFS (Team foundation Server) to retrieve and store codes before recently we are migrating to Stash/bit-bucket, cousins of GIT customized by Altassian (Owners of Jira and Confluence). I am familiar with Java, C#, SQL, Jquery, Angular JS and Python. I think I like Python since I am still learning it, formally.

What is your preferred language. We can start from there.

Our friend from Kenya, I believe you met him in person, Alan Orth did a remarkable job on Github. Maybe he can help us : https://github.com/alanorth

Belay Tekalign

Eyob Fitwi

unread,
Oct 28, 2015, 6:59:41 AM10/28/15
to linux-e...@googlegroups.com
Hi Belay,
 
Great to hear. You've got quite some skills. I envy you man  :-)

As of late I've been feeling that the road to being good at programming is complicated which major players, particularly educators, are not willing to admit.

I learned C++ from college a few years back, though I'm pretty rusty now. I also know a bit of Java but I seriously need to revise it; better off start learning it anew. I would like to know C, C++, Java & Python for starters. I'd also like to get some knowhow on web languages too but I guess it can wait for a while.

I think Alan can help as well. Yo, Alan, if you're reading this give us a holler and chime in! 8-)

Best regards,
Eyob

Belay

unread,
Oct 28, 2015, 11:51:00 PM10/28/15
to Gnu/Linux Ethiopia
Eyob:
Thank you for raising this subject. In IT you pick a language and stick to it. You are married to that language. Day and night that will be your life. So who is your bride?
Java is fat but works wonders on your behind.
JavaScript is the breast feeder of today. You can go far with JS and its offspring node.js, angular.js these are full frameworks. JS is top on the charts. 
C# is microsofty and most people don't like it. I worked in this framework and can beat Java when it come time to deliver.

There are hundreds of them you have to be wed to one for LIFE. This is a life marriage. You can't succeed otherwise.  I met SQL, she is not even a proper lady but what I do with her amazes others. Stick to your lady. You need to talk to her in dreams. Can you do that? I think you should stick to Java. It is more money that we can think? You can build us a house in Switzerland. Dude.

Eyob Fitwi

unread,
Oct 29, 2015, 1:29:28 PM10/29/15
to linux-e...@googlegroups.com
Hi Belay,

Well, that clears up some things. Better settle down now I guess.

I've been leaning towards Java. It quite portable, well known and above all I'll need it if I'm to practice any app development (for Android). Seems I'll prioritize that.

I wanted to get acquainted with Python a little. I've heard it's pretty good for scripting. Whatever that power is, I want a part of it.

I also want to get some basic familiarity with web, JavaScript, and database. Just basic, enough to traverse them if necessary (unless of course I somehow manage to get a good income out of it).

So, I basically want Java now. But I do hope I get to tinker with the others as well.

Best regards,
Eyob

Belay Tekalign

unread,
Oct 29, 2015, 2:20:59 PM10/29/15
to Gnu/Linux Ethiopia
Eyob:
It is Java then who got your attention. Excellent choice. There are three programming styles, in all programming languages. Object oriented, Functional and Procedural.  These days you can't go far if you don't know object oriented language and Java is the king. In academic world, especially among researchers functional language is gaining prominence. Haskel, Lisp are functional programs. They devote themselves to mathematical computation of large nature.
plus1 :: [Int] -> [Int]
plus1 [] = []
plus1 (x:xs) = x + 1 : plus1 xs
-- plus1 [0,1,2,3]
-- > [1,2,3,4]

I have no clue how this works except I know -> is a lambda expression used in C# and Java. I also know [0,1,2,3] is an array used in almost all programming languages, even old C. I used to tutor differential equation for a minimum wage before you were born, so I love math,  but these days, at 57,  I am done.

However when it comes to Python, I can do some work, something better than my defunct Ge'ez. A proper class for gentlefolks like you. That will be all you need and nothing more. Python is sweet and delicious and is in need. It is also easy to teach or advice. Do you want me to post in this board on Python. 

Beware I will flood you and you have to keep up. Lots of homework, one every week. It will take about 16 weeks. 8 will get you to object oriented the rest is a struggle.

Belay

Belay Tekalign

unread,
Oct 29, 2015, 3:22:52 PM10/29/15
to Gnu/Linux Ethiopia
Eyob:
Forgot one more important thing. What IDE do you use for C++. For Java you feel crippled without Eclipse. It is superior to other IDE like Net-beans. However your computer need to have good size RAM at least 4 GB. Eclipse is availabe from https://eclipse.org/downloads/.

 I have plenty Java and XML books and you can have them if you give me your address. Don't buy.

Good day.
Belay
 

Eyob Fitwi

unread,
Oct 30, 2015, 4:07:59 AM10/30/15
to linux-e...@googlegroups.com
Belay,

Thanks. You know, as I was reading your email I coincidentally got a subscription email from codeacademy about a Java lesson being available. I remembered that I started Python on it, though didn't follow through. It also has started a tutorial on Git. Interesting, I'll take a peek at it later.

I've started it, seems smooth. Now all I need is some cheering on (constant nagging :-) ) to continue without faltering. And I'll happily take the challenge of your homeworks. I could use some interpersonal interaction and feedback. Steam runs out quick when you go solo, especially with all the work and stuff.

I have an account on GitHub. It's been there a few years but idle because I don't have skills. Perhaps we could create some kind of correspondence on Codeacademy and Github.

I have Eclipse installed. I used Code::Blocks when I was learning C++.

Best regards,
Eyob

Belay

unread,
Oct 30, 2015, 8:06:54 PM10/30/15
to Gnu/Linux Ethiopia
Eyob:
You can reach far and out and get to marry my cousins. Are you married? I can bring you here to USA for you skill. Sort it out, what is your language. You need to get married to her. Concentrate on one and specialize. I will do what you ask on Python and I am the best teacher next to Harry Potter. Maybe you don't know Harry.
Recently I became a farmer. Can you see my pic?
cheers
belay1.jpg

tegegne tefera

unread,
Oct 31, 2015, 6:46:27 AM10/31/15
to linux-e...@googlegroups.com
I am not a coder so what i am going to say here is not about how to code. 

Daniel Yaiqob and others used to be very active in adopting linux and other opensource initiatives to Ethiopians needs in their younger years.  And almost every thing that we see today is what they have done more than a decade or two ago. The quality and volume of their work that stood the test of time a testimony to their passion and scholarship. But they failed in one important aspect. They did not make any effort to recruit and train young Ethiopians who would replace them eventually. Therefore their work has frozen in time.  

What can be done to start that process now. 

The advantage of doing this work is many fold for example if we take Iyob.
1. he would be working on something that he is very passionate about
2. He would be building his skills
3. He would be building his reputation internationally.
4. He would be learning from some of the best in the industry Ethiopia has to offer.

But the best part is he would make me very happy. 

The keyboard, Ethiopian Calendar are few of the things I would wish to get sorted out in GTK. 

--

Eyob Fitwi

unread,
Oct 31, 2015, 12:54:31 PM10/31/15
to linux-e...@googlegroups.com
Belay:
Tempting. I've finished the Java course on Codeacademy, but it feels stripped down. I'm planning to go through the tutorial in http://www.tutorialspoint.com/java/ which seems more detailed, and do a little practice on codewars.com. You could help me by giving me some real life problems as homework. I will try other languages in good time without overcrowding myself.

Tegene:
That's the thing about our country. Our people are not exactly enamored with the idea of work discipline and are a bit lacking in passion for some ambition. But a select few people seem to always miraculously emerge and carry the country forward. Those precious people to whom we should be grateful. I agree, Daniel Yacob et. al. work is frozen in time, and I think it's high time they're restarted.

I don't think I can quite fit their shoes, but that won't stop me from trying to follow their footsteps, God willing.

Best regards,
Eyob

Belay Tekalign

unread,
Nov 3, 2015, 11:29:47 PM11/3/15
to Gnu/Linux Ethiopia
Eyob:
If you did well with Code School, you are much better than me. I took a bunch of Java classes about 10 years ago and did some work for a year with a colleague who is senior to me. Then he left to work in a bank, and our java section died for a few more years until now. Therefore we can learn it together. But first which level suits you. I have a list below. Also go to https://www.4tests.com/java-programmer
and see how you are doing on the exam. They are not complicated but require familiarity. I didn't fare well on the exam, so need to work harder to regain lost knowledge. That is how it is with programming, if you don't work on it, you lose it. Let us arm ourselves first before heading to Git.

Java Fundamentals (Beginners)
-----------------------------------
Variables and Operators
Classes
Control Statements
Inheritance and Composition
Generics

Java Fundamentals (Intermediate)
----------------------------------------
Exceptions
Collections
Enumerations
IO (Input/Output)
Annotations
Threading

Java Web Fundamentals (Intermediate)
-------------------------------
Writing Servlets
JavaServer Pages
The Expression Language
The Java Standard Tag Library

Spring Framework Fundamentals (Advanced)
----------------------------------------
Architecture and Project Setup
Spring XML Configuration
Spring Annotation Configuration Using XML
Spring Configuration Using Java
Bean Scopes Available in Spring
Reading Properties Files in Spring

Java Creational Design Patterns: (Advanced)
---------------------------------------
Singleton Pattern
Builder Pattern
Prototype Pattern
Factory Method Pattern
AbstractFactory Pattern

Java Structural Design Patterns (Advanced)
--------------------------------------
Adapter Design Pattern
Bridge Design Pattern
Composite Pattern
Decorator Pattern
Facade Pattern
Flyweight Pattern
Proxy Pattern

Eyob Fitwi

unread,
Nov 4, 2015, 1:25:42 AM11/4/15
to linux-e...@googlegroups.com
Belay,

OK, some of the lists I didn't knew exist (of course, there's always something you don't know in IT world  :-( ). But as I said, I plan to finish the tutorial and work my way up step by step. Patience and discipline is going to be our diet.

I started the exam but after a little while realized it was a little bit too ahead for me. I decided to stop and get back to it after I finished the tutorial.

Let's brush up on our coding skills first, then go to the next level.

Best regards,
Eyob
--

Belay Tekalign

unread,
Nov 4, 2015, 12:11:36 PM11/4/15
to Gnu/Linux Ethiopia
Eyob:
Design Patterns are shared by most high level languages and don't really belong to Java, but they are critical for starting a project in any language. The rest in the list are Java goodies. Finish your tutorial and we will see how it goes. Do you use IDE. I suggest Eclipse. There is no need to install. All you have to do is unzip. What is your Java version. Try working on Java 7. Java 8 is new. You can lookup Eclipse here http://www.eclipse.org/downloads/packages/eclipse-ide-java-developers/keplersr2
While you work on your tutorial do this exercises. Just compile and see their output. 

Good Luck.
Belay

Eyob Fitwi

unread,
Nov 4, 2015, 1:16:43 PM11/4/15
to linux-e...@googlegroups.com
Hi Belay,

Yeah, I know about design patterns being implementable by most if not all languages. I looking forward to digging deep on figuring out data structures and sorting and stuff.

I have Eclipse 3.8 installed, (good Software Center got me covered). It's a great IDE. But I'll put it on hold during the tutorial as I've decided that I'll go for the terminal. This is my chance to get dirty with it.

I'll check out the codes once I'm done with the tutorial.

Best regards,
Eyob

Belay Tekalign

unread,
Nov 4, 2015, 9:33:23 PM11/4/15
to Gnu/Linux Ethiopia
Hi Eyob:
This might be a philosophical attitude, but you can also learn going down to machine level language after you abstract it to a higher level. By higher level I meant writing it like normal English. Do you pseudo code or flowchart before you start coding. You need to do at least pseudo coding. 

These days few know how to run command line java, One time I had a Russian boss who used to run .NET framework only from the black windows command line, nothing else. For that you need the gift of the almighty. We are not all the same so we need to try it the speedy way. Do your coding on Eclipse. I beg you. Eclipse plugins are nightmares so you better know how to walk through them. And you can't get your H1 visa unless you code properly like the Indians who take over our jobs. Yes, Indians used to have free access to USA with H1 visa. I sure will sponsor you if you got the skill. Hope my family won't hear of it. I can't sponsor them.

Eyob:
You seem scared, maybe I scared you without knowing. I still have hands out to you to show the power of Python and it is all command line. I tried many IDE. It just like IDLE a command line interpreter. Java could break your neck if you don't respect it.
Belay

Belay Tekalign

unread,
Nov 4, 2015, 9:52:18 PM11/4/15
to Gnu/Linux Ethiopia
Eyob:
One more thing about programming. These days every language has a framework and they program in it. For instance for Java there is SPRING. This you need to know. I am assuming you are finished with the basics in college. I really want to know your level then we can sync. Programming is about sync. Can we sync. Tell me your secret.

Eyob Fitwi

unread,
Nov 6, 2015, 7:23:43 AM11/6/15
to linux-e...@googlegroups.com
Belay,

I hate pseudo code. I don't even like the look of it. I'd rather deal with flowcharts.

I did use Eclipse for class. I love it, and it does make your work easier. I just wanted to use this opportunity to familiarize myself with the terminal on a bit more advanced level, even if it's a tiny bit. No doubt I'll get back to using Eclipse once I get into the more advanced part. I've heard about the plugins but I didn't get the chance to tinker with them. But I don't want to be stuck on any platform.

It's not that I'm scared. I learned the hard way that the best way I can achieve a skill is by starting simple and work my way up with patience steadiness. If I try to do this and that I easily get overwhelmed and things fall apart.

I found understanding frameworks rather a bit of a challenge. And there are so many of them out there. The only thing I had left in college was research, the final course before you graduate. But I had to take a break as it was killing my motivation by getting too theoretical and I needed some breathing space. On top of that I felt that I needed to get some real practice or I'll end up with a paper I can't work anything useful with. Personally, I'm not inclined to collect papers to show off as credentials of my skills - I know they don't mean squat. That's part of the reason I've been so lax on finishing up college. I do plan to finish it, but not without getting some real world experience first. If there's anything I hate is having theoretical knowledge with no practical skills.

Best regards,
Eyob

Belay Tekalign

unread,
Nov 6, 2015, 3:17:46 PM11/6/15
to Gnu/Linux Ethiopia

Eyob
Great points. Wish you the best
Belay

Eyob Fitwi

unread,
Nov 12, 2015, 4:02:33 AM11/12/15
to linux-e...@googlegroups.com
Hi Belay,

I need a little mentoring help. As I said I've been following the Java tutorials whenever I got time and I'm a little stuck on Singleton classes. I wanted to skip it but that smacks of lack of discipline on my part. I understand the concept is to allow only one instance to be instantiated from a class, but I can't wrap my head around the code to be used. All the examples I find are gibberish to me as I can't understand the rationale for using those particular codes. A little help?

Best regards,
Eyob

Belay Tekalign

unread,
Nov 12, 2015, 1:59:47 PM11/12/15
to Gnu/Linux Ethiopia
Hi Eyob:
Good question Eyob.

Singleton is one of the 23 design patterns suggested by the Gang of Four (Erich Gamma, Richard Helm, Ralph Johnson, John Vlisssides) in their famous thesis " Design Patterns: Elements of Reusable Object Oriented Software". The 23 design patterns are grouped into three: Creational, Structural and Behavioral.

Singleton is a creational design pattern. Its purpose is to ensure a class only has one instance and provide a global point of access to it.Creational patterns provide ways to instantiate single objects or groups of related objects.

It is important for a class to have exactly one instance. You may have single license of your database. You can not afford multiple instances to be created that can consume your precious database. You need to control it via singleton. You might have many printers in your company but you only need one printer spooler. There should be only one file system and one windows manager. An accounting system will be dedicated to serving one company only.

Singleton class is responsible for keeping track of its sole instance. The class can insure no other instance can be created and it can provide a way to access the instance. This is the Singleton Pattern. Design patterns are not really a Java thing. They are best practices applied by almost all Object Oriented Programming Languages such C# , Smalltalk, and of course Java.

Use the Singleton pattern when
  • There must be be exactly one instance of a class and it must be accessible to clients from a well known access point
  • When the sole instance should be extensible by subclassing, and clients should be able to use an extended instance without modifying their code

Singleton Implementation - UML Class Diagram

There are many ways of coding Singleton but this example is easy to understand.

public class EyobsSingleton {

   private static EyobsSingleton instance = null;

   protected EyobsSingleton() {

      // Exists only to defeat instantiation.

   }

   public static EyobsSingleton getInstance() {

      if(instance == null) {

         instance = new EyobsSingleton();

      }

      return instance;

   }

}

The EyobsSingleton class maintains a static reference to the lone singleton instance and returns that reference from the static getInstance() method.

There are several interesting points concerning the EyobsSingleton class.

First, EyobsSingleton employs a technique known as lazy instantiation to create the singleton; as a result, the singleton instance is not created until the getInstance() method is called for the first time. This technique ensures that singleton instances are created only when needed.

Lazy initialization is the tactic of delaying the creation of an object, the calculation of a value, or some other expensive process until the first time it is needed.

Second, notice that EyobsSingleton implements a protected constructor so clients cannot instantiate EyobsSingleton instances; however, you may be surprised to discover that the following code is perfectly legal:

I hope that answers your question.




On Thu, Nov 12, 2015 at 1:02 AM, Eyob Fitwi <eyob....@gmail.com> wrote:
Hi Belay,

Eyob Fitwi

unread,
Nov 13, 2015, 3:50:13 AM11/13/15
to linux-e...@googlegroups.com
Hi Belay,

Thanks for the explanation. Things are a bit clearer now.

I suspect I got confused because I didn't go through modifiers first before delving into singleton class. Am I right?

Also, where is the second code? You mentioned it at the end but there is none.

Best regards,
Eyob

Belay Tekalign

unread,
Nov 13, 2015, 6:53:23 AM11/13/15
to Gnu/Linux Ethiopia

Eyob
Singletons are confusing. Read this article http://howtodoinjava.com/2012/10/22/singleton-design-pattern-in-java/

And forget the second code. You have a handful in the article
Belay

Eyob Fitwi

unread,
Nov 13, 2015, 6:56:13 AM11/13/15
to linux-e...@googlegroups.com
Belay,

Good to know I'm not the only one. So what do you think is better; should I continue and revise singleton later on, or must I cover this now before proceeding?

Also, I was think reading about the modifiers will help me understand the workings of singleton better. What do you think?

Best regards,
Eyob

Belay Tekalign

unread,
Nov 13, 2015, 7:04:52 AM11/13/15
to Gnu/Linux Ethiopia

Eyob
Come back to all design patterns later.

Belay

Belay Tekalign

unread,
Nov 13, 2015, 12:18:16 PM11/13/15
to Gnu/Linux Ethiopia
Eyob:
I forgot to add something about modifiers. Yes you need to master modifiers after you after these these terminologies which cross boundary of OOP languages : Objects, Classes, Packages, Subclasses (Methods), Overriding, Abstraction, Encapsulation, Coupling, Decoupling, Composition, inheritance, Aggregation, delegation, Generics. It is a lifetime learning process. Now a little bit about modifiers. 

There are two groups of modifiers in Java
  1. Access Modifiers
  2. Non-Access Modifiers
Access modifiers describe the visibility of the object (usually class or method). There is the world of packages, then that of the class and finally the whole world. Using public will expose the class or method to the world. Using protected will expose it to its own package, the same is true if you use package or simply leave it empty. However, using private will restrict access to the class itself or the specific method or subclass.

I know four non-access modifiers in Java. They are static for creating class methods such as main method as in:
public static void main(String [] args){}
The final modifier for finalizing implementation, the abstract method for creating abstract classes or methods without implementation as in:
public abstract class GraphicObject {}
and for threads the synchronized and volatile modifiers

Good luck on your studies
Belay

Belay Tekalign

unread,
Nov 13, 2015, 11:06:33 PM11/13/15
to Gnu/Linux Ethiopia
feels bad but it would be correcting grammar

Eyob Fitwi

unread,
Nov 16, 2015, 10:06:01 AM11/16/15
to linux-e...@googlegroups.com
Hi Belay,

Me again. I came across bitwise operators, which I don't remember being taught in class. Are they important? Can you think of real-life examples we use them in?

Best regards,
Eyob

Belay Tekalign

unread,
Nov 16, 2015, 8:50:19 PM11/16/15
to Gnu/Linux Ethiopia

Hi Eyob:
Let us break the answer in two parts. Bitwise and Bit-Shift operations were a must in the older days in all languages, when the machines were slow and  it is faster to work on low level programming by manipulating bits (speaking directly to the processor). There is an attitude change these days as machines became powerful. However you might not get a certification if you can't answer fundamentals like these. I searched Google with your exact question and came to this link. Read it and if you want to go further we can discuss it all. For specific talents like Cryptography and IT Security such knowledge is paramount and very highly paying. However you might not encounter these hurdles if you stick to programming in  higher level languages like Java. Read and decide.
https://www.google.com/search?q=are+bitwise+operators+important&ie=utf-8&oe=utf-8

Belay


public class BitShiftTest {

    public static void main(String args[]) {
       
     int number = 8; //0000 1000
     System.out.println("Original number : " + number);
   
     //left shifting bytes with 1 position
     number = number<<1; //should be 16 i.e. 0001 0000

     //equivalent of multiplication of 2
     System.out.println("value of number after left shift: " + number);
   
     number = -8;
     //right shifting bytes with sign 1 position
     number = number>>1; //should be 16 i.e. 0001 0000

     //equivalent of division of 2
     System.out.println("value of number after right shift with sign: " + number);
   
     number = -8;
     //right shifting bytes without sign 1 position
     number = number>>>1; //should be 16 i.e. 0001 0000

     //equivalent of division of 2
     System.out.println("value of number after right shift with sign: " + number);
   
    }  
      
}

Output:
Original number : 8
value of number after left shift: 16
value of number after right shift with sign: -4
value of number after right shift with sign: 2147483644




On Mon, Nov 16, 2015 at 7:05 AM, Eyob Fitwi <eyob....@gmail.com> wrote:
 
Hi Belay,

Belay Tekalign

unread,
Nov 16, 2015, 9:27:57 PM11/16/15
to Gnu/Linux Ethiopia
Eyob:
Let me add one more caveat, if you really want to get into language localization (UTF encoding and all that) you need to know bit operations. Check out this http://kunststube.net/encoding/ Another one will be networking (router, ipv4, ipv6, tcp/ip manipulation, encryption). So I am inclined to say you might need it, but you decide. Did you watch Matrix movie? If you want to knowledge like the beautiful Trinity you might need all the low level information. Actually she just used nmap network scanner program not bit-shifting, but you get the idea. :)
Belay
https://nmap.org/movies/matrix/trinity-nmapscreen-hd-crop-1200x728.jpg

Eyob Fitwi

unread,
Nov 17, 2015, 6:14:17 AM11/17/15
to linux-e...@googlegroups.com
Belay,

Thanks for the info. I guess I should be interested in them. I did a little googling yesterday and figured as much. The problem for me was I was unable to conceive how they would be important. I would definitely want some know how in localization. I would also love to know something about network, which is a weak point for me.

PS: so, a left/right shift beyond 8 would be pointless right, since they would all be zeroes?

Best regards,
Eyob

Belay Tekalign

unread,
Nov 17, 2015, 11:59:34 AM11/17/15
to Gnu/Linux Ethiopia
Eyob:
I will get you long answer when I get home from work. For now your shift size is limited by the maximum number of bits you are working on. This is decimal 6 in 32 bits processor 
00000000 00000000 00000000 0000110. Of course you can shift it more than 8 times. Most computers this days are 64 bits, who knows the future will hold. 

There are three methods of handling negative numbers and how to bit shift them. Example -6. The problem is how does the compiler tell to the processor the - (minus) sign, when the processor knows only 0 and 1? 

Read on it and we will talk later. Bitwise operators mostly handle arithmetic while bit-shifting for logical AND, OR, XOR and in Circuit gates there used to be a NOR. I will read on it. I haven't finished reading this bit shifting tip but it looks good. 

Finally I have mock exam exercises for you at http://www.javaprepare.com/quests/test.html
The answer is at the bottom. Be brave. I didn't score good but we are here to learn from our errors. Isn't?
Belay

Belay Tekalign

unread,
Nov 17, 2015, 2:25:24 PM11/17/15
to Gnu/Linux Ethiopia
Here are some examples bit-shifting in  Electrical Circuits.  Consider the clock as your entire plate. In the last post the 32 bit (4 byte) could be considered one clock for manipulating digital 6
00000000 00000000 00000000 00000110 
  • AND logic states unless both bits are true (1) then result is False (0)
  • OR logic states unless both bits are false (0) then result is true (1)
  • XOR Inline image 8logic states if both bits are the same then false else true(1)
  • NORInline image 7 logic states unless both bits are false(0) then always false (0). NOR negates logical OR, i.e. negation of the disjunction.
  • NAND Inline image 6logic states unless both bits are true (1) then always true (1) 
Inline image 5

Belay Tekalign

unread,
Nov 17, 2015, 2:44:01 PM11/17/15
to Gnu/Linux Ethiopia
Here is a simple cipher (cryptography) to encrypt messages using bit shifting
This is a right shift by 3 letters. 
encrypted = original >> 3
The shifting (although not binary is very applicable in encryption). Such shift is called circular shift because you don't drop the overflow. So the letters XYZ will be placed back under ABC.
Now question for you. Decrypt the following message by hand. What does it say?

BVLY  FP  PJXOQ

Isn't that exciting?

 We might do a java shit later after we look at ASCII codes
Send me a short message with the same formula, i.e, encrypted = original >> 3 

Belay

Belay Tekalign

unread,
Nov 17, 2015, 2:59:48 PM11/17/15
to Gnu/Linux Ethiopia
Good Read:
All three examples are pretty good but I like the second one. What is your favorite?
Note: XOR logic states if both bits are the same the the result is False (0)
Inline image 2
Reply all
Reply to author
Forward
0 new messages