dgplug member blogs

Reader

Read the latest posts from dgplug member blogs.

from mrinalraj

It was one of the best decisions to invest some time with DGPLUG summer training 2019 as I partially owe them my job.

During my virtual on-campus interview, I mentioned what I did during my summer vacation and bonus skills like blogging, helped me land an offer in a multinational company with a networking role.

I was asked what are my hobbies. Mostly everyone begins to answer like I love to sing and so on... I began explaining to them about my blogging and to prove them I briefly shared the story about Edward Snowden and the Internet's Own Boy, Aaron Swartz, which gave me an edge over other participants.

Once again, Thanks DGPLUG :)

Would love to connect with you.

 
Read more...

from mrinalraj

Every year JPMorgan Chase & Co. conducts Code for Good Hackathon at a large scale to hire fresh graduates from the engineering college which every student keeps an eye on...

Luckily, I was one of the shortlisted candidates for the current Code for Good Hackathon 2020. This article is for my friends who are waiting for some insights on their upcoming CFG Hackathon.


Welcome

Welcome


Key Points:

  • The first day was mainly for jelling up with teammates. You need to express what you are good at and decide among teammates to come up on the same page.
  • The ** second-day**, I liked it the most. That was a workshop on technical skills like a web page and Git usage. Also, it's better if you have early knowledge of git and you should at least have an idea on how to solve the merge conflict.
  • NOW, the third day, THE D-Day, Basically the main Hackathon where you will Brainstorm + Code will be of only 24 hours.

Try to focus on developing the main requirement posed by the non-profit NGO's. Keep on updating about your work to your teammates and mentors so that they can help you if you get stuck on it for more time.


Schedule

Schedule for 3 days Hackathon


Skills to focus:

  • Communicate effectively with teammates and mentors. As we all the sailors with a common goal to reach the surface.
  • Knowledge of HTML, CSS, Bootstrap + any app-related knowledge is plus.
  • Knowledge of SQL and XAMP server.
  • Basic knowledge of git push, git pull, git merge, and ability to solve the merge conflict. It is advisable to try collaborating on a dummy file with your friend before entering into the hackathon.

Our Presentation on The Nudge Foundation: Click here for Presentation and Demo

Conclusion

Hackathon is not only for hacking into problems but also knowing new faces, sharing stories, and building memories.

The End is the new beginning


 
Read more...

from pradhvan

Last weekend I attended EuroPython sprints that were virtually conducted. The communication platform for the conference was discord and was kept the same for the sprints too. It served a good platform as we were able to pair program with the maintainer by sharing our screens.

Day 1

Sprints opened at 12:30 PM IST and started with its first round of project introduction. A total of 12 projects that took part in this year's sprint. Though the project maintainers were from varied timezone and timezones are difficult to handle. The first opening of sprints only had a few maintainers of the project to talk about their project.

The project that I started off in the day one of the sprints was terminusdb. I primarily contributed to terminudb's python client which had Cheuk Ting Ho and Kevin Chekov Feeney to help us out. Kevin had coded the JS Client of the project and was here to work on the Python Client.

The issue I picked up was increasing the test coverage of the project and while working on that issue I also discovered some other issues. Some depreciated function was still being used in the client and the make file did not have a command to generate coverage HTML of the project.

By the end of day one, I had moved the coverage of terminusdb_client/woqlclient/connectionConfig.py to 70% from 62% with a PR to remove the deprecated function from the client. Doing that I learned about graph databases and how terminusdb has git like features for the database.

Day 2

I started late on the second day and continued to work on the test coverage PR. I fixed some minor flake8 errors in my test coverage PR and pushed to coverage to 75% and created a PR for that make file command. A lot of people in sprints were confused in setup of project. So opened up a documentation issue for writing the wiki for setup instructions and contributions guidelines for new/first time contributors.

Just an hour before the first closing session I moved to scanapi which is maintained by Camila Maia. I picked up some good first issues and got them merged in no time. I saw this project at the closing of the day-1 and found it very interesting.

The other projects that I really found interesting but could not contribute to were Hypothesis, strawberry GraphQL and commitizen.

Overall I had a really fun weekend and I am excited to contribute more to those projects.

 
Read more...

from sandeepk

Today go through the commands to monitor processes and how to handle them

  • ps – It reports the snapshot of the current process
  • init- It the parent process of all the processes.
  • pstree – Same as ps but list the process in form of tree with more details.
  • top- List down all the process running, update the snapshot after a while.
  • Kill – it signals the process
    • INT – 2 -Interrupt, stop running
    • TERM – 15 – ask a process to exit gracefully
    • KILL – 9 – force the process to stop running
    • TSTP – 18 – request the process to stop temporarily
    • HUP – 1 – Hang up
  • nice – Every process run has priority and with nice we can control this priority, it ranges from +19(very nice) to -20(not very nice) decreased niceness higher the priority
  • renice- change the priority of the existing process

>> top
PID  User  PR  NI  VIRT     RES     SHR     S  %CPU %MEM Time+ Command
3911 user  20   0 2855988 206872 141304 S  72.2  2.6   7:15.09 Web Content                                                                       
31980 user  20   0 3703988 509176 188188 S  33.3  6.3  49:36.10 firefox                                                                           
 2839 user  20   0 2834092 191744 128268 S  27.8  2.4  16:13.39 Web Content    

>>ps
  PID TTY          TIME CMD
 2418 pts/2    00:00:00 zsh
 4318 pts/2    00:00:00 ps

>> pstree | less
systemd-+-NetworkManager-+-dhclient
        |                |-dnsmasq---dnsmasq
        |                |-{gdbus}
        |                `-{gmain}
        |-accounts-daemon-+-{gdbus}
        |                 `-{gmain}
        |-acpid
        |-agetty
        |-apache2---2*[apache2---26*[{apache2}]]
        |-at-spi-bus-laun-+-{dconf worker}
        |                 |-{gdbus}
        |                 `-{gmain}
...
>> nice -n 10 long-running-command &
>>renice 20 2984
>>renice 15 -u mike # changing  niceness for all process of mike user
>> kill -9 PID

#shell #dgplug #ilugc

 
Read more...

from sandeepk

Today was the day with the commands grep and sed.

  • grep – command used for the patter matching it have many useful options

    • -i: to make case-insensitive search
    • -r: search through the file in dire recursively
    • – l: print the name of the file with matching string
    • -c: print the counts of match
    • -n: numbers the matching lines in the output
    • -v: it's like not condition, print the reverse of the condition
  • sed – its read the input lines, run script on them, and writes them to stdout. This command is good for the string replacement and editing of the files.

Both these commands can be used with regex for the pattern matching.


>> grep -nv  ^# \| ^$  /etc/services |less
# will list all the lines from the file with do not start with *#* and ends with an empty line.

>>sed ``s/UNIX/LINUX` file.txt

# sed command will replace the occurrence of the *UNIX* word with the *LINUX*

#shellrun #dgplug #ilugc

 
Read more...

from sandeepk

Today was the day of basic File Management, Pipes, and Redirects. So let's jump to the command's

  • mkdir – create a directory for you, -p will create the parent directory if it does not exist.
  • rmdir – remove the empty directory
  • rm – remove the files and directory with -r.
  • pushd & popd – this one is the new command I came across, it let you save the previous command and you can pop that command with popd when you require. Dirs let you list down the directories you can pop back too.
  • file – tells you about the format of the file
  • ?, * – these are the wildcards which help in pattern matching, '*' for any number of character and whereas ? for only one character
  • | – called as pipe, it takes the output of one program and gives as an input to another program
  • Redirection (<, >) – < this indicates to file to read input from, > this indicates the file to write output to.
  • >> – Appends the output to the end of the file, If the file does not exist it creates a new one.
  • File Descriptors – Standard Input(0), Standard Output (1), Standard Error (2), make sure to check the example below to see how you can use them
  • xargs- it read a text and pass them as input to the following command
  • tee – is a combination of > and | and let you copy data from the input to the output or a file

Now let see these commands in action


>> mkdir -p chess/pieces/board # create an directory for you.
>> rmdir -p chess/pieces/board # will delete whole path if no other file or dir exist
>> pushd /media/USB # will let you save this path
... # any command you run b/w
>> popd # this will get you back to the pushed path
>> dirs # list all the dir path saved
~/bash-trail ~ / ~/Code/tranzact ~/bash-trail/program

>> file shopping_list 
shopping_list: ASCII text

>> whoami | rev # will reverse the output from the *whoami* output
keepdnas

>> last > last-login.txt # will save the output of login user to the file

>> wc < last-login.txt # will pass the text from the file as input to the *wc* command
>> program 2> file # will write the Standard error from the program to the file. **File Descriptor**

>> find /media/USB | xargs -l 3 rm -f  # this will pass files for USB dir and xargs will pass the 3 filenames at a time to remove them.

>> last | tee everyone.txt | grep bob > bob.txt
#  To save details of everyone’s logins and save Bob’s in files also.

#shellrun #dgplug #ilugc

 
Read more...

from sandeepk

Today run through the commands to process the Text streams from the shell.

  • less – command let you show less content from the file you are viewing.
  • sort – helps you sort the output, -f let you do sort case-insensitive and -n numerical sort.
  • cut – help to select the fields(-f)/character(-c)
  • fmt – format the output of the file, you can specify the width with -w
  • tac – similar to the cat command but in reverse
  • sed- this command use to process each line of file with a script

let see these command in action


>> less hello.txt
Hello World
THis is a text file
hello.txt (END)

>> cat shopping_list 
cucumber
bread
fish fingers

>> sort shopping_list         
bread
cucumber
fish fingers

>>date
Thu Jul  9 00:21:17 IST 2020

>>date | cut -d " " -f1
Thu

>>cat COPYING |  less  
The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed

>> cat COPYING |  less  | fmt -w 30
The GNU General Public
  License does not permit
  incorporating your program

>>cat copybump.py
#! /usr/bin/env python3

import datetime
import os
import re
import stat
import sys
...
if __name__ == '__main__':
    do_walk()

>> tac copybump.py
    do_walk()
if __name__ == '__main__':
...
import sys
import stat
import re
import os
import datetime

#! /usr/bin/env python3

>> sed -f spelling.sed < report.txt > corrected.txt # correct the spellling mistake in report.txt and output the correct text in corrected.txt

#shellrun #dgplug #ilugc

 
Read more...

from sandeepk

This post and the continuing post will be post/notes to share my journey of going through the shell to brush the commands which I forget and to learn some new ones.

So here one or more things I learned today. * !! – will show you the previous command. * ! String- show's the last command with the given string. * !$– will give the last argument of the previous command * !^ – will give you the first argument of the previous command * ^String^replacement- will replace the first occurrence of the * String* with the replacement string. * Ctrl + A – will get you to the start of the line. * Ctrl + E – will get you to the end of the line. * Ctrl + D – will delete the current character, even can close your shell session :). * For loop – yup we can write for loop to certain repetitive actions. * Locate – can help you to search for the file/s in the drive. * file – it not only help you with the file search just not based on the name but has many options to perform on the result and you can use regex for the file search also.

Now let's dive into some cool example

>> ls
...
>> clear
>>!! # will refer to the previous command
>> clear
>> !l # refers to the previous command start with a given string in our case `l`
>> ls
>> cd Documents
>> echo !$ # will refer to the *Documents* args from the previous command, same will be the case with *!^*  which refer the first args of the previous command
>> ls
>> echo !$
>> echo ls
>> echo Documents
>>for file in *; echo ${file}; done # try to run this in the shell to see the output

References

#shellrun #dgplug #ilugc

 
Read more...

from pradhvan

I recently stumbled across a very peculiar topic called Bit Manipulation. In most of my programming days, I haven't actually relied on the binary operation to get me the result, I know under the hood everything is converted into 0's and 1's but it was all abstraction to me.

The case was different here. While working with Bit Manipulation, I had to actually rely on arithmetic bit operations to get me to the result. So it became real interesting real soon.

Bitwise operators

Basic operation done on bits are done with bitwise operators. Since we primarily work on bits these operations are fast and are optimized to reduce time complexity.

The first three &, | and ~ are fairly straightforward. So I would briefly go over it.

&: if both bits are of equal size than & operator would compare each position and would return True/1 if input bits are True/1. Similarly for False/0.

    6       : 1 1 0
    5       : 1 0 1
            -------- &
              1 0 0

|: if both bits are of equal size than & operator would compare each position and would return True/1 if input bits differ. Similarly for False/0.

     5       : 1 0 0
     3       : 0 1 1
            --------  |
              1 1 1

~: Not operator just compliments the bit it gets. In fancy computer lingo it gives one’s complement of a number.

    5       : 1 0 1
            -------- ~
              0 1 0

Now coming to more interesting operators:

Operator Name
^ XOR
>> Right Shift
<< Left Shift
XOR

If two bits are of two equal-size ^ of both bits in the compared position would be 1 if compared bits are of different binary and would be 0 if bot the compared bits are the same.

    6       : 1 1 0
    5       : 1 0 1
            -------- ^
              0 1 1
  • XOR of a number with itself is 0

    x = "Any int number"
    (x ^ x) == 0
    
  • XOR of a number with 0 is number itself.

    (x ^ 0) == 0
    
  • Ordering in XOR does not matter, both will give the same output.

    output = (7 ^ 3) ^ (5 ^ 4 ^ 5) ^ (3 ^ 4)
    output = 7 ^ (3 ^ (5 ^ 4 ^ 5)) ^ (3 ^ 4)
    

While discussing Left Shift,<< and Right Shift, >> we will be talking about arithmetic shifts.

Left shift <<

  • Left shift shifts the binary digits by n, pads 0’s on the right.
  • Left shift is equivalent to multiplying the bit pattern with 2 power k( if we are shifting k bits )
1 << 1 = 2 = 1 * (2  ** 1) 
1 << 2 = 4 = 1 *(2  ** 2) 
1 << 3 = 8 = 1 * (2  ** 3)
1 << 4 = 16 = 1* (2  ** 4)
…
1 << n = 2n

Right shift >>

  • Shifts the binary digits by n, pads 0's on the left.
  • Right shift is equivalent to dividing the bit pattern with 2k ( if we are shifting k bits ).
4 >> 1 = 2
6 >> 1 = 3
5 >> 1 = 2
16 >> 4 = 1

Both Right shift and Left shift operators come real handy in masking.

Masking allows the user to check/change a particular bit at a particular position.

Some of the common functions associated with masking are:

Set Bit
  • The set bit method is generally used to SET a particular with 1.
  • To achieve this we would need to create a mask at the particular position where we want to SET
  • The mask can be created with the help of the << if the left shift operator.
def set_bit(x, position):
    mask = 1 << position
    return x | mask

set_bit(6,1)
  • In the above code snippet we are SETing the bit at 0th index.
    masking = 1 << 0 = 1 * (2 ** 0) 
    
    6       : 1 1 0
    1 << 0  : 0 0 1
            -------- |
              1 1 1
IS BIT SET
def is_bit_set(x, position):
    shifted = x >> position
    return shifted & 1
Clearing Bit
def clear_bit(x, position):
    mask = 1 << position
    return x & ~mask
Flip Bit
def flip_bit(x, position):
    mask = 1 << position
    return x ^ mask
Modify Bit
def modify_bit(x, position, state):
    """
    state is param that tells us to set a bit 
    or clear a bit
    """
    mask = 1 << position
    return (x & ~mask) | (-state & mask)

Observations

Bit manipulation can be used to solve problems that you are familiar with but necessarily don't know about. Here are some of my observations that I noted while using bit manipulation.

To check if the number is even
  • & ANDing the number with 1 gives 0 or 1 — 0 if it's even — 1 if it's odd
x = "Any int number here"
(x & 1) == 0

Practice Question

To check if the number is a power of two
  • If a number is x binary representation of (x-1) can be obtained by simply flipping all the bits to the right of rightmost 1 in x and also including the rightmost 1.
Let, x = 4 = (100)2
x - 1 = 3 = (011)2
Let, x = 6 = (110)2
x - 1 = 5 = (101)2
  • x & (x-1) will have all the bits equal to the x except for the rightmost 1 in x. In the given example below the values enclosed in || are the same for both the x and x-1 if x is not the power of 2.
  • If the number is neither zero nor a power of two, it will have 1 in more than one place.
Let, x = 6 = 1|1|0
(x- 1) = 5 = 1|0|1

Let,x = 16 = |1|0000
(x-1) = 15 = |0|1111

Let,x = 8 = |1|000
(x-1) = 7 = |0|111

Let,x = 23 = 1011|1|
(x-1) = 22 = 1011|0|
x = "Any int number here"
(x & x-1) == 0

There are a lot more things that can be done with just bits and are definitely not limited to the above observations. Try to find your own observations. Happy coding!

 
Read more...

from pradhvan

I recently finished reading Python Testing with Pytest by Brian Okken and I am glad I picked this up rather than jumping into the docs. It's definitely a good introduction for people who haven't had their share of testing a python codebase, let alone be with Pytest.

The book introduces a python CLI called Tasks and takes this as a base for writing all of its tests throughout the course of the book. Though eventually, the tests become more complex when you get into the latter half of the book.

The pros of the book are that it covers almost every section of the framework from fixtures, plugins, custom pytest configuration and even using pytest with tools like coverage and mock. But if you're someone like me who hasn't had his share of testing a python codebase you might find yourself with a bit of information overload at times.

I did find the book a bit of overwhelming on chapters like writing your own plugin, custom configuration and using pytest with Jenkins because these are the features that I wouldn't be using right out of the box. I would definitely be coming back to these chapters in the future if I need any of the features.

Overall the book is really well-written keeping in mind beginners who are just picking up pytest as their first testing framework and also for folks who are moving towards pytest from any other testing framework. Exercises at the back of every chapter make sure you also get some hands-on experience of writing tests.

Just a personal tip for anyone who is picking this up and has less experience with pytest. Feel free to skip chapters or skim chapters that aren't useful right out of the box. You can always come back to them when you need those features.

 
Read more...

from pradhvan

2019 has been a year of new beginnings both personally and professionally. This was the year I got my first job, the first salary and on the contrary to that, I did give my first resignation. Yeah, that was fun!

This blog just highlights most of the things I did in the previous year.

Blog Posts

I did post out 8 blogs this year. I know it's not that much. Initially, I had planned one blog a month. But by the end of the year during the time I was giving interviews for the new job things started to fall and I could not commit to one blog a month.

The plan for this year is to blog more or at least be consistent with writing. Stick to at least one blog per month.

Books

The previous year was a good reading year compared to the last few years. The Kindle I bought came real handy during the long metro rides. Plus I got some tech books cheap compared to their paperback prices so I did finish some of them too.

This year I started to take up reading non-tech books a bit more seriously. So I am picking up a book a month and finishing it slowly. Keeping in consideration that the book is less than 800-1000 pages for the initial months just to help in making a momentum.

Recently finished Parliamental and will be moving to The Elephant Vanishes.

Talks

I did give one talk at PyConf Hyderabad 2019 one of my favorite regional conferences in India. I also did submit one for a PyDelhi meetup but sadly by the time, it was scheduled I had already relocated. More on that later.

Open Source Contributions

One of the major things that I want to work towards this year is towards making more upstream contributions.

Last year I did submit two document patches to one org aio-libs . The project was aiopg, async version of Postgres but that happened by sheer luck. As I was going through the documentation I found some of the documentation to be using old-styled decorator based coroutines instead of new async def function. So I submitted a patch to update them.

 
Read more...

from abbisk

Free Software

“Free” software “is software that can be used, studied, and modified,” copied, changed with little or no restriction, and which can be copied and redistributed in modified or unmodified form. Free software is available gratis (free of charge) in most cases. “In practice, for software to be distributed as free software, the human-readable form of the program (the source code) must be made available” along “ with a notice granting the” user permission to further adapt the code and continue its redistribution for free. This notice either grants a “free software license”, or releases the source code into the public domain.

Open-Source Software

In the beginning, all software was free in the 1960s, when IBM and others sold the first large-scale computers, these machines came with software which was free. This software could be freely shared among users, The software came written in a programming language (source code available), and it could be improved and modified. Manufacturers were happy that people were writing software that made their machines useful. Then proprietary software dominated the software landscape as manufacturers removed access to the source code. IBM and others realized that most users couldn’t or didn’t want to “fix” their own software and There was money to be made in leasing or licensing software. By the mid-1970s almost all software was proprietary “Proprietary software is software that is owned by an individual or a company (usually the one that developed it). There are almost always major restrictions on its use, and its source code is almost always kept secret.” users were not allowed to redistribute it, source code is not available users cannot modify the programs. Software is an additional product that was for sale In 1980 US copyright law was modified to include software In late 1970s and early 1980s, two different groups started what became known as the open-source software movement: East coast, Richard Stallman (1985), formerly a programmer at the MIT AI Lab, launched the GNU Project and the Free Software Foundation. “to satisfy the need for and give the benefit of ‘software freedom’ to computer users ultimate goal of the GNU Project was to build a free operating system the GNU General Public License (GPL) was designed to ensure that the software produced by GNU will remain free, and to promote the production of more and more free software.

 
Read more...

from mrinalraj

GroupPhoto Give respect to what you love and you will find the way to get it out to the world. Today I want to share with you my journey conducting WRITOFEST 2k19.

  • Establishment of app : We had a very solid idea but an uneven path on how we will implement this idea which was to make a platform for the readers. Our idea was unique as there were no such platforms where through the app users can get a quality quote and Shayari as the market was operating on the users' content.

  • Came up with daily writing contest idea As it was obvious that we had to face low user engagement in the beginning so we came up with the idea of “Daily Writing Contest” which gives the users a chance of getting featured on the wall of the Scriptink app under the title “Best writing of the day”. Fortunately, it worked, writings started coming. It was at this time we came in touch with various writers whose writings could become a part of the Scriptink Family.

  • Getting recognized as college group. There was a lot of confusion about whether opening a college group will distract us from our objective but in the end, we formed it intending to build a team that will continuously work for improving the product.

  • Came up with Writing competition. After being recognized as a college group first we need to conduct an event to establish our existence in the college. The “WRITOFEST 2K19” was our first National level Literary Fest.

  • Came up with the idea of including Poets Scriptink started walking on the path less traveled by. Including the events featuring famous poets was one of our masterpieces. But the path was not as easy as always. Contacting distinguished poets like Javed Akthar, Chetan Bhagat was full of fun and was like getting goosebumps every second with the excitement that we had talked with these celebrities.

  • Digital marketing Our digital marketing was damn too good. We somehow managed to get it posted on the INSTA and FB pages of Jai Ojha sir who had followers nationally. It was like WOW moments for us.

  • Sponsorship Some part of our event was college-sponsored but our budget requirement was much more. So we needed sponsorships. At some places, we got disappointment where they were ready to give support but later it didn't correspond with our college terms.

  • Conducted the event successfully The 10-day rigorous reach-out campaign resulted in having Jai Ojha sir(Poet), Alok Puranik (Satirist), Parameshwaran PS(Ted Speaker) as our chief guest. And the event went smoothly the better than we expected.

Our team spirit made impossible things possible. To which we will always pat ourselves.

 
Read more...

from mrinalraj

Bond

Recently I was in Bangalore for attending Annual Convention 2K19 in BNMIT college. I had nothing to worry about because the round trip was being handled by the college. I can't help myself from feeling lonely as all my friends were busy submitting assignments but the knowledge I would gain was acting as a fuel to get me going.

At the end of the Convention, I realized that there was no one there from my college and to my utter surprise I found that I had 2 missed calls on my silent phone. The call was from one of the faculty coordinators. I callback him to find that the college bus has started, leaving me behind and there was no question of returning.

I won't hide the truth from you but I was scared at that time. Though I had multiple round trips from Tumkur to Majestic, this was a completely different situation for which I was not prepared. While I was estimating how much penny I am left with, a person called me. I only recognized him from his face as he was a senior and was also there during the trip. I came to know that he had purposely missed the bus as he was gonna stay with his friends in Bangalore itself. After I revealed to him that I am from SIT for attending the event, he offered me the accompany until he gets me a bus to Tumkur. I was completely amazed and pondered why is he caring about me? Is it because we are from the same college? Whatever it may be but this made me realize that there is some natural bond between seniors and juniors which is built on respect and these bonds is what built trust in him.

 
Read more...

from mrinalraj

Today I had experienced my first phase 1 test for one of the major MNCs named as GOLDMAN SACHS. It came for the internship program for the associates level. Whatever it may be but it opened my eyes. It showed me what is my current position and made me crystal clear on what are the fields I should improve which I will reveal in this blog so be with me :) .

A total time limit of 2 hours was given to solve 15 questions on the hackerrank platform which include 2 Coding Question at the beginning followed by 10 MCQ related to basic C programming concept, 1 Advanced Programming question and 2 subjective questions which were to test your command on the English language.

It is suggested to first target the MCQs followed by the coding part and keep the subjective part for the end.

The problems on Advanced Programming were based on the application of Knapsack and backtracking.

As I mentioned earlier it was an eye-opening internship test for me where I came to know that now I need to think deeply about the applications of the algorithm. Just implementing and getting the output won't work. As someone has rightly said that coding comes from the practice and examples and not from the reading books.

The algorithm teaches us that the problems can be solved in many ways but solving it efficiently to help solve the real-world issues is what matters because while practical implementation data is available in billions and you can imagine how a slacky program can eat up the resources. A lot to learn a lot discuss. Till then keep coding.

 
Read more...

from pradhvan

PyCon India is one of those conferences that I look forward to every year. This year marked my fourth conference in a row. I was excited to meet all my old friends and make some new ones.

ChennaiPy the local python user group of Chennai hosted this year's conference. This meant two things I will get to attend the conference in Chennai and also visit some beaches around Pondicherry. So yeah I was super excited.

The journey to the conference started on 11 October, I was traveling from Delhi with two of my friends Kuntal and Sakshi. Since we planned our journey in such a way that we would reach one night before the conference, we missed the pre-conference volunteer's meet. Kuntal and I were in a state of regret of not taking the morning flight as the pre-conference volunteer's meet are super fun. You get to see the venue beforehand, helps out with swag bags and interact with all the volunteers and organizers of the conference.

On reaching the Chennai airport we met with Dedipyaman, he was staying with us. His name was a bit unique so we called him twodee, which he later adopted as his nick. Traveling to our Airbnb apartment was a challenge in itself as none of us knew Tamil. We were staying with 13 other folks, I knew most of them besides one, Shubo. I had seen the nick on the #dgplug but haven't met him in person. When we arrived at the apartment only Shubo was present, rest came in an hour or two. As everyone settled, we played some rounds of Uno while enjoying pizzas just before going to bed.

The next day I left with twodee and Sakshi for the conference, we were running a bit late. When we reached the conference I saw Kuntal at the registration desk. We all got our attendee card and proceeded to the conference. I saw all my old friends, most of them I only personally meet during conferences as they all live in a different state. So it was fun to catch up. After roaming around the sponsors both I went to attend Pradyun's talk. The talk was titled Python Packaging – where we are and where we're headed, I was interested in the talk as only a handful of people maintain pip. Since it's such a huge ecosystem in itself it was interesting to get some insights from Pradyun's talk about how packaging works with pip and how are they planning to move forward. Later in the tea break, I met with Saurav and Haris. I learned a lot from the conversion we had during the tea break. These people have been in tech much before me. Saurav talked about his company Deepsource, how managing a small team with people who take up responsibility is easy. You don't have to worry about those formal things like timesheets, leave policy because people take responsibility for their work. Haris was working in a two-person team and shockingly carried a very old cell phone which didn't even have internet. So his take on life was very interesting.

The next day we had our annual #dgplug staircase meeting, this year since Kushal was sick. Sayan took the initiative of conducting the meeting. We discussed the first staircase meeting, what went wrong in this year's summer training that people weren't completing their tasks, weren't showing up in the IRC channel and what needs to be done now. I meet lambainsaan who I had always thought was a bot.

The meeting concluded at noon and it was just in time for me to catch up the talk “Let's hunt a memory leak” so I ran to the hall to get a good spot. Sanket was the speaker, he showed us various ways how he solved memory leak problems in a flask app in production while describing the whole memory management concept in Python. I rushed for lunch after the talk as I had to be in open spaces for the PyDelhi's session.

Anuvrat had registred the open space for PyDelhi and other communities of the north. The whole agenda of the open space was how to be consistent while conducting the meetup, what can we do in the meetup we get people to come often and how can we increase the quality of the talks. I liked one idea of pushing all the 101 sessions to blog posts or even hangout sessions a day before the event so we aren't limiting the target audience to just people who are starting in tech. Of what we have been observing in the recent meetups, experienced people who can help mentor people and give great talks have stopped attending meetups. The problem is there were a lot of 101 sessions happening. We concluded that we can shift those 101 sessions to blog posts and if someone wants to give a 101 session we can have themed meetups once in one-two months where they can present those talks. The open spaces were scheduled for half an hour but we stretched it a bit longer as more people started adding points to the discussion.

Before the closing keynote of the day I helped in volunteering at hall-B, I was so much excited for the keynote that during the tea break before the closing keynote I went and sat in the second row of the hall just so I can enjoy the talk from a good spot.

The conference ended with David Beazley keynote, he live coded a stack machine, wrote an interpreter for Web Assembly game that was initially written for Rust in Python and in the end added PyGame to make it into an actual game. It was a jaw-dropping moment for me, though I lost in the midway of his talk it was a bit advanced for me. But when I looked around most people were feeling the same. The keynote ended with standing ovation from all the people in the hall. For me, the whole closing keynote was like a movie it was such a joy to just watch David live code and nothing could have been a better way to end a conference.

The last day of our stay in Chennai was a bit weird as there was some issue with water in our apartment so we went a bit late to the workshop. I had bought tickets for David's workshop “Write your own Async”. In the workshop I tried to follow up with him, was writing code just as he would do it but after the second half, I was a bit lost so I just focused on listening to him. It was not exactly like a workshop but more of him giving us a problem and we would discuss the solution to it and he would live code the solution after the discussion. The solutions were so well designed that it would be similar to the inbuilt functions that the Async module has. As I tried to live coded with him so wasn't able to make some detailed notes that I could revisit later.But luckily he uploaded the workshop screencast so I can revise the concepts again.

The day ended with me saying goodbye to all the people that had stayed late during the dev sprints as workshop and devsprints were happening in parallel.

This marked the end to one more year of my PyCon India journey. It was my fourth PyCon India and the most special one. I stayed with people that I look up to in real life and had lots of fun. The funny thing is not all of them use Python as their day to day language yet they came to a conference dedicated towards the language. I guess that's the beauty of the community. You meet so many people from different backgrounds and learn from them which not only helps you be a better developer but also gives a different perspective towards your life.

 
Read more...