Linux commands

Linux distributions are operating systems much like Windows or MacOS.  Many of the features found in Windows or MacOS are also present in Linux operating systems. However, a powerful tool often not notably used in Windows or MacOS is the UNIX command line terminal.  In many ways, it can seem like a primitive tool, but its efficiency and flexibility make it a standard in software development. This blog post is going to go over the basics of using the UNIX command line terminal. As in anything, the best way to understand how to use it is to try it yourself. Note that everything these commands do can be done in the file explorer or using certain programs. There are two major reasons for learning them, First there are some computers(like the timberlake server) that only have the terminal, no UI. The second reason is that it’s quicker, maybe not now but keep in mind that the ui tends to simplify and pad things so users don’t need to deal with extra clutter or mess important files, the terminal does not do that. This is because most people who use computers are casual users, this is not at all a bad thing but it’s what most OS cater to.

This following segment is based on Ubuntu, but most Linux distributions will use the same commands.

Step 1, Opening a terminal on Ubuntu:

There are multiple ways of opening the terminal.

Option 1: Right click on the screen, a drop-down menu will appear, click open terminal.

Option 2: Click on the terminal icon in the toolbar

It looks like this:

Option 3: Click on activities in the top left corner(or the  on the bottom left corner). Then search “terminal” and click on the terminal icon.

NOTE: Not all of these methods work for all distributions, but Linux is very customizable they might not be setup which is why I put multiple options. But, there is a terminal on all the distributions.

The terminal should look something like this.

Let’s break down what this means:

This is the username of the user currently issuing commands.

This is the name of the computer.

This shows which directory you’re in.

In this instance, the “~” symbol indicates you’re in the root directory.

Step 2, Creating a text file.

To create a file, use the command touch <name of file> like so:

This will create an empty .txt file

Next, to view what’s inside a directory, use the command ls:

ls will display all folders and files in your current directory

Step 3, Editing Files.

    To begin, i’m going to introduce a simple text editor called nano

    It is akin to Notepad on Windows or TextEdit on MacOS

The command works simply by writing nano <name of file> like so:

If nano is not found use the following command:

    ~$ sudo apt-install nano

Using this command will lead you to a terminal based text editor:

From here, you can type anything as you normally would

To save, press Ctrl + O, and enter

To exit, press Ctrl + X, unless saved, it’ll ask if you want to save the file, select yes by pressing Y and press enter

Step 4, Entering Timberlake server:

ssh stands for Secure SHell it allows you to connect to another computer remotely. You will use it to access the Timberlake server. This is a server that is used and maintained by the CSE department. To enter it, use the following command with your ubit username: ssh <username>@timberlake.cse.buffalo.edu

Note: you should be typing in your username not <username>

If it’s your first time connecting to Timberlake, this message will appear, type in yes and click enter.

Next type in your ubit password, the characters will not appear on screen for security reasons.

If everything works out then this will appear.

Step 5, Creating and Navigating Directories

Use the mkdir to create a directory called CSEtest:

To see the directory, use ls:

To go into a directory, simply use cd <directory>

To go back one directory, use cd ../ or cd .., to go back to the home directory(also called the root directory) use cd ~

To leave the Timberlake server use exit.

Step 6, Transferring files with SCP:

SCP or Secure Copy Protocol copies a file from one computer to another

The scp command is composed of 3 main parts,

  1. scp – the actual command
  2. The file to be sent – In this case its test.txt
  3. The location you want the file to be sent – following by a colon to the destination path.

If this is your first time using the scp command you may get this prompt. Type in yes.

With that your done! Hope this helps!

Libraries

This blog post will go over two of the libraries on campus. As a general rule they all have some sort of seating/tables if you just want to study. Seating like this is common throughout the campus but especially in the libraries.

There are two major library on north campus, Capen(also called Silvermen) and Lockwood.

Capen is the only library open 24/7 and is composed of three major levels. It’s more of a study area then a library and while you can go their to get books most it is dedicated to seating and tables. It contains a printing center on the first floor and 3 scanners on the second. On the third floor is has a small cafe called Whisper’s Cafe that sells coffee, premade sandwiches and small treats (also keep in mind that they don’t sell pizza or soup or any traditional warm meals, it’s a cafe after all). In addition, Capen has designated silent section on the third floor if you need it and both the 2nd and 3rd floor have entire sections that contain computers running windows. Finally Capen allows you to reserve certain spaces. The capen library has 16 private study rooms that can be reserved here: https://booking.lib.buffalo.edu/reserve/silverman. There very useful when working in a group but they are in demand. The competition for them shifts alot based on time and day but in general they are heavily used during midterms and finals so make sure to plan ahead. Capen also has to video recording studios that contain a mic, camera, projector, lights and are sound insulated. And 4 editing stations which have most the better known editing softwares installed on them. Capen also allow you to rent media equipment here: https://booking.lib.buffalo.edu/equipment.

Lockwood Library is an actual library, as in there are books everywhere on everything. It’s NOT open 24/7.  It has two parts, the main library and the cybery next door. The cybery is mostly study space and contains a printing center, the UBIT help center and computers. The main library is made of five or six levels, it has a scanner near the entrance, and like Capen, it has reservable private rooms (https://booking.lib.buffalo.edu/spaces?lid=3087). Additionally, it has librarians that specialize in particular subjects. They are available to meet by reservation and can be useful when your making papers on a particular subject and want a good starting point. There is a list of them here https://library.buffalo.edu/askalibrarian/inperson/bysubject.html.

Those are the 2 big ones, additionally there is the Health Sciences library in south campus and the law library on north campus.

GHC 2018 and WE 2018 – Shreya Parashare

This year I had the honor of receiving scholarships to attend two of the biggest women in engineering and women in technology conferences. Grace Hopper Celebration for Women in Computing is the biggest conference for women in technology. Here women from all over the world from various backgrounds gather to support and celebrate each other. GHC is a truly empowering experience. The celebration spans 3 days and its main attractions are the keynote speakers and a huge career fair. The conference hosts a variety of panels and workshops on topics like leadership, management, artificial intelligence, cybersecurity, cloud computing, etc. It also provides funding and recognition to women-led startups that are aimed at making a difference in this world.  This year’s conference was held at Houston, Texas between 26th September to 28th September 2018.

There is a number of scholarships and travel grants available that either completely covers or aid in covering the conference expenses. I was awarded the Anitab.org GHC scholarship which covered all of my conference expenses. The application for this Scholarship opens around February-March. It requires you to fill out an application, answer a few questions about your experiences as a woman in technology, submit your resume and a letter of recommendation.

The Society of Women Engineers’ WE 18 conference is one of the largest conferences for Women in Engineering. This year’s conference will be held in Minneapolis, Minnesota between 18th October to 20th October 2018. WE 18 is an excellent opportunity to meet the diverse women in engineering and learn from their experiences. It is attended by students, faculty, professionals and offers a number of workshops and seminars about the latest developments in the various engineering disciplines. This conference provides a much wider spectrum of exposure. It is an excellent opportunity if working across disciplines excites you! WE18 also boasts of a humongous career fair and excellent keynote speakers.

I was awarded the Google Travel and Conference Grant to attend WE 18. This Grant covers my traveling and housing expenses. The applications for this Grant open around June-July and they generally get back to you around a month before the conference.

Both of these conferences are hubs of tremendous opportunities to learn, grow and explore new career trajectories. The best part is the opportunity to connect with revolutionary women and get inspired by their stories. These success stories encourage us all to be proud WOMEN IN STEM!

UB Hacking 2018

This post was written by Lawreen Latif, a senior in Computer Science and the current director of UB Hacking.

UB Hacking is our annual student-run hackathon hosted at the University at Buffalo. From a pool of 1000+ applicants from across US & Canada, from over 20 universities, we select ~500 students to participate in a 24-hour hackathon where they get to showcase their creativity, teamwork and problem-solving skills through their software and hardware projects.

We work hard to provide a fun-filled, beginner-friendly learning environment and a multitude of resources for students to grow their technical skills by applying them to a project of their choice. Furthermore, working in a team-based environment gives them the opportunity to learn essential skills for the industry.

Our top two submissions last year were “TreatStrabismus” where 2 students created a VR game to treat Strabismus and “#cute_coffee_boi” where 3 students upgraded an ordinary coffee maker adding twitter functionality, web based activation and deactivation etc. My personal favorite was the “Mario Sketchbook” where users could create their own hand-drawn world for Mario to play in. (Check these and more project at Devpost!)  

Although these sound incredible, Hackathon projects can and often are encouraged to be much more simpler. You will be working for less than 24 hours and not many people can come up with a fully functional, bug free program.

The week before the Hackathon, we work with several on-campus organizations like ACM and Scientista to organize beginner-friendly workshops. We also have a hands-on workshop during the hackathon so students can come out with something to show. I would highly encourage students to attend these. We also lead a Project Ideation workshop both before and during the hackathon. If you don’t have an idea or a team, this would be a great place to start.

During the hackathon, don’t feel rushed to start working on your project. Spend the first 2 – 3 hours discussing what you want to build and what technologies you want to use. Try to find a project you’re really excited about. Write it down and break it into smaller tasks. Remember, it is very hard to stay motivated and work on a project if it is too difficult or too big, even if it checks all the “buzz” words.

Next, spend at least an hour before the submission deadline preparing your pitch. This is essential but often overlooked. You likely worked all night on your project so you want to present it to the judges in the best way possible. If you are in a team, maybe assign 1 – 2 members to work on the pitch. Get creative here! If you didn’t get to complete your project, show what you worked on and the potential you see in your project once completed.

Finally, a hackathon is essentially 24-hours you put aside to work on all the cool technology aside from classes. You could just pull up a tutorial for a project and follow that to completion. Maybe build a simple to-do list or a Javascript game, or maybe a small android game. Whatever you might have been thinking of but didn’t get to due to classes. We also have several sponsors and representatives attend UB Hacking. Take some time to talk to them during their workshops for the fireside chats!

One last note, due to the space and budget limitations, we often don’t get to accept as many student as we would hope to. If you weren’t accepted, you can still get involved by volunteering or mentoring. It’s a lot of fun and you definitely get to meet a lot of amazing students who are active in the department this way (+ free food and swag!).

We look forward to seeing you at UB Hacking!

A Day and A Life – Florebencia Fils-Aime

On the first day of Freshman year: I was nervous for my first day of class. I never coded before and I didn’t know what to expect. The closest I’ve been to coding was my Robotics class in senior year of high school and I didn’t find the instructor very helpful. My father didn’t say much about me deciding to be a computer engineer, but my mom, being the typical immigrant parent that she is, wanted me to be a doctor. I had a friend from high school with me and he helped me learn a lot of things like coding, and math. Before classes even started we decided to go to the spine (where all the academic buildings are on campus) and see where everything was so we wouldn’t get lost. I still think I got lost using all of the tunnels and bridges, but someone always points me in the right direction.

 

On the first week of Freshman year: I finally remembered where my classes were without looking at my schedule and I bought all of my books at the bookstore (which was so pricey). I learned after buying them that it was better to get to know upperclassmen and ask if they were selling used textbooks. I was very shy and reserved at the time, so I never tried to ask. Another thing I learned about getting textbooks is renting them. This way, you don’t worry where you’ll have to put them after the semester is over. One mistake I made was getting a textbook through Amazon and forgetting that I also need an access code. Be careful because some classes may require books with access codes and if you’re not careful, you’ll buy a book and completely ignore “may not come with an access code”. This can be a problem when you have to buy the access code online and you realize buying the access code separate from the book is more than the bookstore charges for that textbook.

 

Moral of the story: Weigh in your options and decide what’s best.

 

On the bright side, that only happened with one of my gen eds. Zybooks is what I used in CSE 115 and I don’t remember it being an outrageous price.

 

Anyways, in class, I didn’t know that learning a language in Java would involve learning concepts while typing effective code. Learning these concepts were difficult. I just looked at the Zybook and wrote notes based on them and I was fine.

 

On the first month of Freshman year: It was the normal cycle of a college student. You have to study. But even though keeping your grades up is essential, it’s also essential to step away from your computer and improve on hobbies outside of your major. For example, when I am stressed out I like to write poetry and draw perspective drawings. I also like to read books in my spare time.

 

During the first year of Freshman Year: I had a lot of ups and downs. The project for CSE 115 was difficult. It was to make a game similar to candy crush and I wasn’t able to find out what was causing bugs so it was very frustrating. For me, whenever the two buttons needed to be switched it would either not switch or one of the icons on the button would turn into a different color. However, what I learned from my CSE classes if you do well on the homework and okay on the tests, you’ll be fine. CSE 191 was filled with a lot of conceptual topics but the most important but tricky subject was proofs. Inductive proofs will always be slightly confusing to me. However, like many other classes, practice makes perfect.

 

Paying attention to your perquisites are also essential as well. Physics 107 has the some of the hardest homework problems I have ever seen, but going to my TA’s office hours really helped. I went to his office hours like every session and he was very helpful. Don’t worry, I am certain that the TAs for physics are physic majors so they know what they’re doing. My math courses were fine because Math is my strong suit, but even when I had a problem I went to the math help center. And my TAs for Calc 1 and 2 were great.

 

So if you’re struggling in a class, ask for help, whether it be a TA, your professor, or some of the friends you made in some of your classes.

Helpful Websites

A lot of useful websites are available for college students. This post will focus on useful websites for CSE students in particular.

  • Google scholar: A part of google that specializes in research papers, it’s very useful if you’re doing research or if you want a more direct line to credible scientific sources.
  • Online code validators: Simply put, there websites that check if your code is structured correctly. I personally have never gotten much use out of validators that check the more common coding languages (like Java or Python), however, have found that they are useful for more obscure languages like Regex, or file types like YAML, or JSON (which deserve a post of their own):
  • Code training sites: These sites are useful to help get better at programming through practice. I’ve found them to be most useful when studying for CSE exams for classes with limited homework.
  • Stack Overflow: This site works sort of like yahoo answers, but specializes in electronics, computers, and programming. It is extremely useful when you’re stuck on a programming assignment.
  • WolframAlpha: A site that allows you to do complex math (such as derivation and integration). It is useful for checking math answers, but be careful not to let it do your homework for you. Another good and credible online calculator includes Desmos. If Desmos and WolframAlpha fails (which is very rare), there are many great alternatives such as fxSolver, Symbolab, Cymath, and Mathway.
  • Autolab: A service that the CSE department uses to automatically check and score your programming assignments (was created and is maintained by UBCSE and only useful if professor uses it in his/her class)
  • Piazza: A forum for classes that allows you to contact your professors, TAs or fellow classmates about questions relating to the course (only useful if professor uses it in his/her class). If you want to personally communicate with people in your class, try softwares such as Slack.
  • Utility services: Websites such as WhatIsMyIP allows you to check your IP. SpeedTest allows you to test your internet connection speed.
  • GitHub: This website allows you to share, contribute, and download coding projects. Think of it as a GoogleDoc for programmers. It’s considered an industry standard tool and you will almost definitely use it for group based coding projects at the university.
  • GeeksForGeeks: This website is especially useful for understanding important coding basics and abstract data types. It is also another great source to practice typical programming interview questions.
  • Notepad++: A simple text editor with code parsing functionality.
  • LibreOffice: An open source office suite software, similar to Microsoft Office. Alternatively, if you prefer MS, students can download Office 2016 for free.
  • VLC: A cross-platform media player that supports many video file formats. I have found this a better alternative to preinstalled video players, such as iMovie or Windows Media Player due to the quality in sound and video.
  • GIMP: An open source free image editor. Another alternative website includes Paint.NET. Draw.io is similar, as it is a free online app for flowcharts, and diagrams.
  • Audacity: An audio software for editing and recording audio files that supports multi-tracks.
  • Malwarebytes: Free malware and virus removal software. Keep your computer safe and protected and run this software frequently to avoid unnecessary stress!
  • qBittorrent: A BitTorrent client useful for downloading or transfering large files via the internet.
  • Universal USB Installer: Allows creation of bootable drives, Alternatively, Rufus does the same thing.
  • Display Driver Uninstaller: Useful for when updating video drivers/migrating to new card.
  • Wireshark: An open source packet analyzer. It is also a fun website to play around with in order to better understand networking concepts.
  • Postman: A website that serves as a HTTP API tester.

 

  • Websites to Organize your Computer: Lastly, with all these websites, along with the other documents and files on your computer, you’ll want to keep all this clean and organized. Check out these websites and softwares if you’re running low on storage or want to tidy up your computer.

 

    • CCleaner: Removed temp and junk files from computer.
    • KeePass: Open source password manager
    • Zotero: Cite and source manager

Computers

If you’re going into CSE you will need a computer(it’s in the name after all). If you don’t have one, here are the minimum requirements.

Some programs require a lot of computing resources; however coding in itself doesn’t have to. For instance, while not recommended, you could code using a simple text editor like notepad.Options also exist for running programs that a budget computer might not be able to. If there is a program you need to make or test that requires a lot of resources, then you can opt to have it run in one of the UB’s servers(which you can access from your personal computer remotely).

For a personal computer, UB recommends some computer specifications, that while not set in stone, should keep you ok.

  • Hard Drive: 500 GB HD space – this is where you will store your files.
  • Memory: 4GB – RAM, short-term memory for application use.
  • Processor: Any CPU single core at 2.0GHz – often considered the “brain” of the computer, does the complicated number crunching.

Keep in mind, these are the absolute minimum requirements, you will more than likely get better specs.  A cheap laptop that fits these requirements will run you down at least $300. Again, these are the absolute minimum requirements in accordance to UB, and will most likely serve as a work computer.

More options exist for a more a powerful computer(so you can play video games). Just keep in mind that more powerful laptops are going to be bigger/heavier and more expensive. If you plan to have only one computer to play and do work, then it might be a good investment. Keep in mind, however that most coding assignments will not need that much computing power. It’s up to you if it’s worth the weight of the laptop, and if you favor having a portable gaming device.I would recommend buying a small laptop for your schoolwork/coding assignments and an desktop PC for gaming at home. This gives you the best of both worlds without the disadvantages.

Helpful computer programs

Since you will be working with computers  from here on out, here are some programs we would recommend downloading:

  • Eclipse: If you plan on coding in Java, it’s best to download Eclipse. It’s currently the most popular Java IDE(integrated development environment) which means the program is designed like a work space for your code. Depending on what language you want to code in and how you wish to do so, you can modify eclipse with plugins, integrations and SDKs(software development tools) that allow you to do all of you development under one umbrella. (https://www.eclipse.org/downloads/)
  • Pycharm: If coding in Python, download Pycharm, It’s an IDE made by the same people that made the Python language. There are other IDEs out there for Python (or example Anaconda and IDLE) as well, so feel free to check them out. Pycharm has two versions- the community version, which is the basic version and is free and the professional version, which cost money but gives you extra tools/perks, HOWEVER, there is a free student licence that you are qualified for, which will allow you to get the professional version for free so be sure to take advantage of it (https://www.jetbrains.com/student/).
  • Putty: If your using a Windows machine, then your going to need to download Putty. Window by default does not have the ability to SSH(windows 10 does but its in beta) into other computers (SSH deserves a post of its own, but in essence it means connecting to the command line of another computer remotely) and you will need the ability to do so. (https://www.putty.org/).
  • Remina: While you can’t SSH in Windows without installing a program, its remote desktop (allows you to remotely access a computer’s UI, usually best for remotely operating windows machines) is terrific. The converse is true for Linux, you can SSH very easily, but their remote desktop program is not great. Therefore if your using Linux, downloading Remina (or another of the various remote desktop tools for Linux) is recommended. (https://remmina.org/how-to-install-remmina/)
  • Virtual Box: Basically this program allows you to have a computer running inside your computer. It’s useful if you have a Windows machine but want to run a Linux machine for certain homework sets or want to get used to the operating system.(https://www.virtualbox.org/)
  • Atom: Essentially, atom is much like Microsoft Word in that it allows you to edit files but Atom allows you to modify any file regardless of the extension(word only modifies .doc files and its variants(https://en.wikipedia.org/wiki/List_of_Microsoft_Office_filename_extensions). Just note that certain file are only meant to be read by the computer and therefore can be opened but are absolute gibberish. I will recommend Atom because that is what I use the most but there are others like sublime text and vim (https://atom.io/).
  • Git bash: Git is best explained as a Google Doc like service for programming projects (and it will need its own post). Git bash allows you to use git commands so you can upload/download your project to and from git. Git is considered industry standard so you will need to at least know its basics.(https://git-scm.com/downloads)
  • AnyConnect secure mobility client: this is a VPN(stands for virtual private network) that you can download from the university. This is useful if you need to connect on campus for submitting homework assignments, but are off campus. (http://www.buffalo.edu/ubit/service-guides/software/downloading/windows-software/managing-your-software/anyconnect.html).
  • LaTex: LaTex is best described as the enhanced version of MS Word. LaTex is a great alternative for writing research reports and math documents. It is also entirely free and is supported by any operating system. The only downfall is that LaTex has a slight learning curve, since it requires some knowledge in the syntax and language it uses. However, if you are familiar with markup languages, such as HTML, then you should be able to learn it in no time. Using LaTex makes writing your documents more efficient and elegant.

 

There are also a ton of free programs available for download from the university at this link: (http://www.buffalo.edu/ubit/service-guides/software/downloading/windows-software.html). Many of them do require a license but since the university bought the licence en mass it does not cost you anything to download and use.

Help areas

All Teachers Assistants(TAs) and professors have office hours, however the chemistry and math department take it one step further and have designated rooms that are staffed with TAs most of the day.

The Math department has the math center located on the mathematics building (very easy to remember) in room(s) 107/110. It’s staffed continuously from 9am to 4pm Monday through Friday and it can help with most undergraduate math classes. However note that it starts 2 weeks after the start of each semester. Link: https://www.buffalo.edu/cas/math/ug/math-help.html.

Chemistry 101, 102, and 105 through 108 are all considered ‘general chemistry’(there the introductory courses, you need to take 107 if you are a computer engineer). They have a help center in the natural sciences complex. This center replaces TA office hours for those courses and is generally open from 9am to 5pm, Monday through Friday(and sometimes for a couple hours on the weekend) depending on how the TAs decide to setup the schedule that semester. It starts a week or two after the start of the semester and ends the week before finals week.

In general having a TA explain a concept to you is a far faster and accurate way of learning it then researching it online so take advantage of these centers when you can.

Linux vs macOS and windows

If you’re reading this post on a computer, chances are you can spot one of these two symbols somewhere on the screen. Either a variant of this: or a variant of this:. These are the symbols for Microsoft Windows and Mac OS, the name of the operating system running on your computer.In a nutshell, operating systems serves as a platform for separate programs to run, which means all computers must have an operating system in order to be functional. The two above are the most common, mostly because they are extremely user friendly and are backed by very large companies. However there are many others, the most well known being the Linux family of operating systems(). There exists many Linux operating systems each serving different functions. You will definitely see a Linux operating system at some point during your time as a CSE major. Due to Linux’s massive customization potential there can be many, many differences between Linux and the other two major operating systems but here are some of the biggest.

 

  • It’s free: Windows and Mac operating systems must be purchased, but most Linux systems are open source; the code is available for everyone to use, modify and improve at no cost.
  • More developer friendly: Far greater customization and less restrictions allow for a better more suitable programming environment than Windows and Mac. This comes at a cost of user friendliness.
  • Better command line:(i.e.:) Better native command line, has far more uses and allows for the creation of more complex scripts.
  • Bigger learning curve: Most tasks involve using the command line more and leaves less to the UI.
  • Lower market share: Less popularity means that some programs available for Mac OS or Windows may not be available for Linux.

 

This post serves mostly as an introduction to Linux. If you’re interested in trying Linux out for yourself, Linux Mint (https://linuxmint.com/) or Linux Ubuntu (https://www.ubuntu.com/) are a good place to start.