Tumgik
pc-eight-four · 2 years
Text
False IDLE(s): Python's built in text editor is the ONE!
When I started to learn Python, I was working my way through a text book and an overwhelming supply of YouTube tutorials to try my hand at being a digital wizard. Now I won't be covering the fabled 'Tutorial Hell' that many of us who are self taught get trapped in, screaming for relief, surrounded by piles of abandoned code taunting us from every side. What I want to share was the never ending saga of code editor/environments pushed on you from all sides, also known as IDE's. Here's a snippet from CodeAcademy defining an IDE:
Tumblr media
Sounds pretty cool right? That's because it is! It seemed like every tutorial I read preferred on over another. 'Learn Python 3 the Hard Way' by Zed Shaw had me start out with ATOM text editor (goodnight sweet prince), it was simple, but to my newbie brain, full of settings i was sure I'd never understand. Then a few tutorials pointed out the amazing features and capabilities of PyCharm so I downloaded a free community edition right away! So sleek and flashy with cool highlighting, but what were all these weird files and directories showing up around my helloworld.py file? I was already up to my ears in esoteric ideas and syntax, no one said anything about surprise files and directories! All this AND the resources this program were using up was making for slow loading and I could hear my poor little laptop begging for mercy. VsCode was more aesthetically pleasing for me, and supported multiple languages but -there's those damn funky files again!
Tumblr media
There were some editors I found that were minimal , but they all had little things that bothered me or did something for me that I wanted to understand before handing over control to the automation gods!
As beginners we're at our most susceptible to marketing manipulation and advertising. The waves of information are hitting us from every side and everyone is offering safe harbor in their particular product and solution. It's the paralysis of choice! But fear not, because the Zen of Python can guide us here, reaching out through the darkness like the beam of a lighthouse:
SIMPLE IS BETTER THAN COMPLEX
Tumblr media
Just for the sake of this tutorial imagine that as soon as I read the Zen of Python, clouds parted and a serpent delivered a message, whispering in my ear "Look into the language for your answers".
Tumblr media
To my surprise, Python has an editor bundled into it BY DEFAULT that's simply called IDLE (Integrated Development Learning Environment) and if you are coding with Python, then you already have it at your fingertips!
But how easy is it to access?
How To: Python IDLE
In Mac or Linux, open a terminal by either searching for 'terminal' or often times CTRL + T will launch it automaticlally. Once you find it you should be looking at something like this:
Tumblr media
The little blinking block is waiting for you. Type all lowercase idle and hit Enter.
Tumblr media
For Windows you should have some menu shortcuts like these:
Tumblr media
Type, Click and that's it! You have just launched Python's very own text editor and development environment!
Tumblr media
You might wonder where the familiar text editor is since the window clearly says IDLE Shell at the top. The Python Shell aka REPL (Read Evaluate Print Loop) is an important tool and has it's uses, but I find myself most often opening IDLE for the text editor.
We can get to the text editor by finding the File drop-down and selecting New File. Alternately the keyboard shortcut is Ctrl + N
Tumblr media
Voila! A blank canvas!
Tumblr media
Let's enable the numbered lines that we're used to seeing by selecting the Options drop-down and choosing Show Line Numbers
Tumblr media
Enter a Hello World program .....
Tumblr media
Before running the program we want to save. Navigate to the File drop-down and selectSave File or CTRL + S
Tumblr media
Once the program is saved, navigate to the Run drop-down menu, selecting Run Module to run the program. Once again you could just hit the F5 key to bring economy to your movements (if you forgot to save, IDLE will remind you before allowing you to continue)
Tumblr media Tumblr media
Looks like Mr. Worldwide has entered the chat!
Everything is working as it should! If you are coding along with this you may be wondering two things. Why is your editor so painfully WHITE (Bright light! Bright light!), while these examples are relaxing you with their cobalt blue. Why does your IDLE still launch into the Shel when opening?
Tumblr media
Like everything else so far, this is an easy fix.
Dip into that Options drop-down menu and select Configure IDLE. This brings you into the Settings menu where we change font size and face (I've tried a bunch of fonts, none seem to be as clear and pleasing as the default) and make many of the configuration changes to make our hearts sing.
Tumblr media
Let's take care of the 'Theme' first so our eyes can be awash in the deep blue of this little tutorial. Switch from Fonts/Tabs to Windows .
Tumblr media
The option you're looking for is right at the top. Select Open Edit Window
Tumblr media
Click Apply and your settings will be saved.
To get our initial configurations aligned to our delicate sensibilities, Switch from Windows to Highlights. Now to the right ( your right), click the drop-down menu and select IDLE Dark. Ahhhhhh...
Your eyes are already relaxing after searching for the perfect simple IDE for Python for so long.
Tumblr media
Click the Apply button after you make any changes and you are ready to code, leaving a little bit of the worry and complexities noobs are pounded with on our journey to high digital sorcery.
There will be a time in our growth as Python programmers when we will be ready for all the virtual environments, automated package importers and GIT integrations you can shake a stick at. In the mean time, IDLE is a perfect middle ground that is reliable, simple and is even written in the very language we are learning!
Every text editor and IDE has it's audience and it's place. You my find that Pycharm , Vims, VsCode or even Emacs is a perfect fit for your Python development and to you I say hurrah! What's important is that we find tools that feel comfortable for each of us and let us focus on learning and building rather than fumbling around endlessly with the tool itself.
Hopefully you find IDLE is a hidden gem of an IDE that serves you well in your learning journey.
One last thing weary traveler.....
Tumblr media
Happy Coding!
9 notes · View notes
pc-eight-four · 2 years
Text
2600: Lost and Found
Now that DefCon has ended, life has returned to normal. That means I'm more fired up with ideas for project than ever! I might end up sharing some more detailed stories from DefCon but for now, I wanted to share some inspiration I found in between the pages of a fabled zine called 2600.
Tumblr media
I first came across this little pocketable zine in my early 20's. I was working the dream job for a book loving stoner, Barnes & Noble. This was during the rise of Starbucks and out here in the desert, corporate culture ruled with an iron fist. Indie bookstores falling left and right became the norm in those days(the rise of Amazon would then lead to THEIR near demise -poetic justice?). In spite of the grim state of print, I was happy to be surrounded by books.
I had been on the lookout for zines in town but found they were in short supply (unlike my visits to San Francisco or Portland). Two exceptions to that were 'Maximum RocknRoll' and '2600'.
Tumblr media
These scrappy zines weren't full of perfume samples and muscle bound dudes selling you the latest greatest thing you didn't need. They weren't gossip rags or drippy prose stuffed full of them selves. Quite the opposite.
MRR was black and white throughout and full of punk music, politics, show/music reviews and rants from angry humans around the world. The content wasn't written by a bunch of snobby staff writers, it was written by the readers (zines is shorthand for fanzines or fan magazine), regular people who wanted to be heard. Unsterilized, reading a zine can be empowering, if THEY can write and get published so can I!
Tumblr media
2600 was the MRR of technology and cracking it open, I expected the same feeling of communion with strangers from far away. Instead, I read an article about how to hack an early self checkout system and turn it into an ATM! Other articles were technically dense with terminology I'd never encountered and I quickly decided that it was all too much and beyond anything I would ever be capable of understanding (I was also not interested in stealing cash from an ATM or anywhere for that matter!)
So it was between me and 2600 until today. Something clicked post DefCon and that memory of my early 20's came back. I was ready to know what was in those pages that has kept it in circulation since 1984 and see if I had changed or if it was the dense technical manual I recalled.
Tumblr media
I walked into a Barnes & Noble to complete the circle, and fished the only copy from behind corporate rags stinking of sterility and began to read. Immediately I knew I had found a new favorite thing! I was flipping through the pages fervently, focused and excited. Easily, money changed hands so I could bring it home and continue in comfort.
Once home I found an article from Tim R entitled 'Data Analysis as a Next Step'. In it, Tim makes a case for adding independent data analysis to our hacking toolkit when there are data leaks and other information that is commonly analyzed and digested for us by news outlets. Using tools like Python, Tim encourages readers try understanding these data dumps for themselves as well as perhaps offering independent verification for our peers or organizations who could benefit from the shared knowledge of how to USE these tools.
This is the kind of overlap I am seeking in learning to code/hack. Motivation to keep learning, paired with a desire to creatively make a difference are at my core and ideas like this make me feel like I'm on the right track.
Tumblr media
Learning Python in general has been my focus over the last few years, but knowing how I'll end uo applying that knowledge is where I come up short (what kind of roles do I look for work in? Do I WANT this to replace my current career?). That may be changing as I notice feeling more focused and alert when going through data manipulation and visualization exercises (Pandas!). The more I learn about the technology we use day in and out, I become increasingly concerned with free speech, privacy and security as well. Overlap. Merge. Lo Frequency-> Hi frequency.
Thank you 2600 for waiting all these years for me to catch up! If you are also are waiting for overlap, direction or focus, know that it will come with time. Just keep moving forward.
https://defcon.org/
0 notes
pc-eight-four · 2 years
Text
EndDayzz
I'm wiped out! Didn't meet my networking goals, but I did get a chance to see aspects of security in the digital world I hadn't before been exposed to. I was able to see a few ways Python can be used for good (and evil) and found out that thetevis a ton of creativity in what these people do daily. I'm looking forward to improving my skills in Python and also understanding more about how to protect my family and friends digitally! I may give some more technical insight but overall this was an event and community I plan on becoming more and more involved with.
-see u at DC31!
Tumblr media Tumblr media Tumblr media Tumblr media
0 notes
pc-eight-four · 2 years
Text
Day 3con reflecting:
Another day down! Today was workshop day. The title of the workshop was "Dig Dug: The lost art of network tunneling." I don't want to go into the details of the workshop - it was a ton of info to cram into my brain - but I can say that I loved every minute of it! There were prizes raffled off at the end, but the main thing I took away was an emphasis on the importance of privacy and retaining control of our data. These were not new concepts to me, but listening to Eijah talk about the code we were deploying, his passion for what does and why were infectious.
After this I made it to a bar to eat and have a beverage. It was super busy (Saturday afternoon in Vegas it's no surprise), but I found a chair next to some folks with badges. While I didn't end up connecting with them on Twitter (the only thing I could thing of at the time), they were a reminder that I shouldn't be afraid to talk to strangers! Twri sets of strangers in an hour! This was actually a big deal for me. While I can chat with strangers over a bar top no problem, once I'm solo one on one, I tend towards quiet and timid.
Met up with GT and we made our way to the Social Engineering Village. A panel on a career in SE was a great insight into yet another aspect of cyber security that interests me. Then I ran into an old friend who I had no idea was in the tech world! She is a talented artist and it was great to know someone with a similar creative background was here (and had attended other security conferences) networking and taking in the con like I was! Again, she had advice on how to network and approach new people which I really appreciated and hopefully I can work up the courage to talk to more people I don't know!
Googly eyes are everywhere and in everything! It's so funny. I love it!
Tomorrow I may try out a 'cold call' sign up at the SE village where noobs can try to get x bits of info from a preselected 'targets' in a 5 minute window. Each day is bringing something new and I am looking forward to another one! Oh and I may have bought a split 60% Keyboard I'll be putting together sometime soon!
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
0 notes
pc-eight-four · 2 years
Text
Tumblr media
Shadows cool us down....surround me... Smother me in the weight...hide me from.....a world that hurts my eyes...
2 notes · View notes
pc-eight-four · 2 years
Text
Day Two Reflection
Today started with me being overwhelmed and stricken with anxiety over finding lines! Everywhere! Add to that a long list of talks/demos and things to do and I thought for a minute about going home. But it was early. I had a friend to meet, I had to try to make the most of this.
Then within an hour, all the lines were gone (I panicked too early) and things were feeling more like the conference I imagined.
I came here because I want to see what piques my interest. To figure out what sounds cool versus what I could drive deep into (if anything!). I found a lot of interesting things around me that were cool but other than spending an hour in the packet hacking village, all I had were a lot of brief introductions to topics. I also had the opportunity to meet a couple of great people thanks to the fun Octopus Game put on by MiroLabs.info It's a racket style game where players have to find each other and play some kind of game to decide who moves on. I won the first game against medus4_cdc by standing on one leg longest (moooo, thanks for the swag and being so friendly!!!). I was then eliminated by 2dor3 in a STARING contest that lasted about 3 seconds! Dude! You totally rattled me! Lol.
My student coach reminded me today that people expect to network at events like DefCon so not to be afraid to engage. Tomorrow I will work towards doing that just a bit more and maybe make another connection into this new world.
Bartending has been great, but this stuff is exciting!
Tomorrow brings me to a workshop that will combine things I know (Python) with things I don't (ssh tunneling/encrypted communication). Especially after a day of overstimulation and spreading my attention all over, I am really looking forward to focusing abd learning something new, with people who are doing the same.
Oh and don't let me forget Good times. He called out a banquet bartender for disparaging the attendees in a language he thought no one would understand (GT did) and there was another time today where he is always looking out for people who might be in trouble or being taken advantage of which just reinforced my respect for this dude. GT, you are a good dude.
I'm tired. Tomorrow I'm packing light. Here's some Flix from my adventures and a time that goes with the vibe from today's finale....
Cheers from DefCon30
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
1 note · View note
pc-eight-four · 2 years
Text
First Day Reflection:
We brought donuts. I will always bring donuts to linecon from now on. People love donuts...some are wary some are reluctant but even those who resist, you can see them eating with their eyes. Very satisfying.
One gentleman who took a donut flipped back around and gave me a GPIO extender thinga-ma-bob in exchange. So very nice. Others offered stickers (don't mind if I do!), and some gave smiles underneath masks.
The folks around us were pleasant and small talk found it's way as we sat, stretched, stood or hurried around mumbling something about "anybody see a radio shack grumblemumbledeedlesoo".
Once badges were acquired, I was excited to see a badge with music since I'm on the newbie side of hardware hacks. It was fun to listen to people debating the meaning of marks on the badge, the meaning of the notes and adding my own suggestions to the discussion.
I also found that there are people who won't hesitate to turn their nose up at something that is beneath them. In the cocktail world it's the craft bartender ('mixologist') who laughs at the pleeb ordering a vodka soda or a pbr 'in a place like this'. In the DefCon line it was 'Ew Android? Seriously yuk, I can't even! We can't be friends.' I laughed to myself reflecting that it goes to show that the hacking community is just that, a community of humans just like any other-no better no worse.
I'm glad the lines are done for now. I'm looking forward to the workshop I managed to land a ticket to on Saturday and exploring villages and talks tomorrow.
All and all a good, if short, first day at DefCon30.
0 notes
pc-eight-four · 2 years
Text
We've arrived! Donuts for new friends in tow and posing with the goons in our way into #LineCon. Now we wait! Empty box is happy box!
Tumblr media Tumblr media
0 notes
pc-eight-four · 2 years
Text
DefCon-10?
My first DefCon was years ago. A good friend of mine at the time had an older brother into cyber security. This friend of mine suggested we skateboard to Alexis Park where it was being held. While my memory isn't the best, we probably parked at UNLV so we could skate some spots on our way. That was when I had the 89 Caprice, Beastie Boy vibes all day!
We were 18/19 at the time and awkward as hell. Probably had some weed with us, our goals were hoping to meet girls and get free booze from someone. I couldn't believe an entire hotel could be taken over like that! The pools were alive with hackers smoking and drinking and talking about who knows what brainy magic! We wandered in and out of hotel rooms, clearly out of place with music, strobe lights and hotel tvs keeping the vibe alive.
We never did meet up with his brother or meet the hacker girls we longed to meet. We only ogled, snuck away to smoke weed in the parking lot, and took in the whole scene, naive to it all. I never thought back then that I'd be returning to DefCon all these years later. Even three years ago, I wouldn't have thought I was going to trip over BitCoin and end up falling into programming.
I'm looking forward to writing this new story. Telling a story of that time I finally came back to DefCon and was able to participate, learn and hopefully in the end use what I've learned for some greater good. Hell the dream is to somehow mash all the crazy creative shit I've learned over the years into something I can continue to be proud of.
I'll see you there. Me and my buddy GoodTimes will be bringing donuts to linecon. Please excuse me if I'm still a bit awkward.
Tumblr media
1 note · View note
pc-eight-four · 2 years
Text
EMF listener...
Built the LOM Electrosluch MINICITY I got from cctv.fm a few months ago. What better place to take it than DefCon30?! Can not wait!
Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media Tumblr media
0 notes
pc-eight-four · 2 years
Text
Swings...like our dreams....just out of reach...
Tumblr media
1 note · View note
pc-eight-four · 2 years
Text
Preparing for #DefCon30. Aka my first DefCon as a participant. The only other time I've been was 20+ years ago as a punk-ass skater looking to hang out and get trashed with my friends (who knew a hacker....) It's strange, we live many lives in a lifetime.
Tumblr media
1 note · View note