Jump to content

TWiT GitHub (Perl zip examples) broken


G+_Joe C. Hecht
 Share

Recommended Posts

TWiT GitHub (Perl zip examples) broken.

 

Reported in the past, going forward, still broken.

 

Your example files in the zip use Unix style line endings, and will turn to garbage when loaded into your recommended tool of choice (Windows notepad).

 

Windows Users: To deal with the issue, I recommend an editor that can work with all styles of line endings: NotePad++ available at notepad-plus-plus.org

 

 

TWiT: Again, I recommend that you:

 

(a) Download what you upload, then open the files using the tools you recommend and try it out. Either pretend you are a new user that is a listener, or get some that is a new user to do the testing.

 

(b) Recommend additional tools suitable for the task. IMHO,  NotePad++ is a great choice.

 

© Certainly, there will be those who will defend the practice of feeding the majority of the audience (Windows users) with files that have Unix line endings. To those defenders, I will ask you to also make the point that the files should be unloaded in .tar.gz format instead of zip files. To end, either give your users two files with correct line endings (ie: a .zip for Windows users and a .tar.gz file for everyone else), or place two directories in the zip file, one for Windows users and one for everyone else).

 

URL:

 

https://github.com/PadreSJ/c101_Module3_Perl

 

I have called this practice "slop" in the past (short for "sloppy"), and was told that my labeling was "harsh". Really? You guys are the "experts", and as "experts" you knew of the problem existed before the first upload, so either you were sloppy, or truly not qualified. Pick your poison.

 

To be made aware of the the issue and then repeat the mistake is nothing short of "careless".

 

Harsh? To that person, I ask that they take the next sentence, and replace the word "Netcasts" with the word "Packages", and replace the the word "People" with the word "Shippers", then go look at the historic aspects of your twitter feed:

 

"Netcasts you love, from people you trust"

 

Replacing gets you:

 

"Packages you love, from shippers you trust"

 

In short, I expect that you will take the same care for your viewers as you might expect from your package delivery services :)

 

You know the issue, and it is easy for you to get fixed. Why not do so?

 

And Padre, I know you are a busy guy, but I am thinking that you have enough pull to be able to recruit someone from TWiT's massive army of volunteers to make sure the job gets done right.

 

Finally, to those who really want to defend the "OK-ness" of the issue, and call Windows line endings "pollution" or say dealing with the issue is "something newbies need to figure out", all I have to say is "come on guys"... really??? We are trying to bring in new folks to programming, so you are going to throw rocks in the path of a clueless newbie and call it good? Frankly, I am disappointed in that kind of attitude, thinking that for someone, the failure of the provided code to load might be the one thing that turned them away from programming. Sure, they will need to learn to deal with it, but not today. The folks downloading the code are crawling up from an experience level of zero, and should probably given points for even installing Perl or unzipping the file in the first place. Please try to remember what your first day felt like, give them a break, and help them along!

 

Thanks,

 

TJoe

https://github.com/PadreSJ/c101_Module3_Perl

Link to comment
Share on other sites

Downloading a zip is not the only way of getting code out of github.  Padre has mentioned several times about cutting and pasting the code from github into your editor of choice.  Github has a nice "raw" button that displays the raw file, and all you need to do is copy and paste. 

Likewise there are several ways to get code into github.  I can vouch that if you create a new file through the github web interface and cut-and-paste your code (created in Windows) into the new file, if you ask for a zip file, it comes out with unix-style line endings.  I don't know how the show puts its code into github, so we may be looking at the effects of how github stores its data. 

Link to comment
Share on other sites

Windows line endings ARE non-standard. Text-based command-line tools and scripting languages predate Windows, and most programming languages are created on Unix and later ported to Windows. Perl is close: Windows 1 was just out, but it too was clearly a Unix tool from day one, later ported to Windows. I'm all for helping newbies, and explaining that they may have to get a better text editor, but let's leave the files themselves standard. A file with carriage returns in it is, arguably, not a valid Perl program: some Unixes may choke on the CR at the end of the shebang.

Link to comment
Share on other sites

Lee,

 

I believe the main context of the two episodes is about using ActiveState Perl with Windows Notepad. No?

 

Zip files are also non-standard on Unix. Why not argue for tar.gz files that Windows users cannot (in general) work with?

 

Is it not true that system line endings are configurable under Unix?

 

Or that other Unix systems may in fact have use other line ending combinations? Whats standard about that?

 

Real programmers use Linux? Really? Sadly, I hear that Linux comprises of less than 2% of installed desktops.

 

Companies actually making money producing programmer tools? One word: Windows. Selling computers? Same word. Selling software? Same word.

 

I see your argument as a detriment to the majority, as you (once again) attempt to tilt your cause in favor of your favorite operating system.

 

I would like to think you might want a fair solution that would benefit everyone, but you seem dead set on insulting Windows users, calling their files "pollution" in your 2% world.

 

The Linux community sports some great documents on how best to advocate the Linux operating system. I believe it details ways of showing how Linux is a good thing to try, and spells out guidelines, asking Linux users to please not alienate people from Linux by making disparaging remarks about their current operating system of choice.

 

I would like to think this community is large enough for everyone, and with that, operating systems of all colors and flavors.

 

Ya know, Lee, historically, Spanish is based on Latin, but the line endings may be different. How do you feel about people who choose to speak Spanish?

 

TJoe - A Windows, Mac, and Linux user

Link to comment
Share on other sites

It would be interesting to know how many people download the zip files vs copy-and-paste. The programs are so short that I always open the file in a browser window and then just copy and paste the code into whatever Windows editor I'm using. I haven't had any EOL issues. I do agree though that the code posted by the show should be in a universal format.

Link to comment
Share on other sites

What I'm saying is that Python and Perl were created in the world of Unix, and later adapted to Windows, a tiny player in the world of OSs because it's mainly on desktops. The vast majority of computing devices in the world run some form of Unix, most of them Linux. Nearly 100% of mobile devices run Linux-based Android or BSD-based iOS. Learning to program only on Windows would limit a newcomer's job prospects considerably. Learning to program without learning how to deal with Unix is like studying ancient Greece without learning some Greek.

Link to comment
Share on other sites

Darryl Medley My guess would be "not many". Probably more than the folks who cloned it, and far fewer that those that got the code via cut and paste.

 

Truthfully, Who knows... I may have been the only one :)

 

Nope, Lynda (my wife) says she did, and promptly issued a "WTF???". She thought it was her fault, and that she did something  wrong.

 

I think that most people will cut and paste, doubting that anyone who already knows programming would have much interest in the code, and also doubting that anyone starting out would really even know what "git" is, much less how to operate it, and if they did, well, they are probably further along than the episode's material.

 

I do reserve the right to be wrong, and certainly, there will be exceptions.

 

I'm guessing the "target audience" works out to something like ((80% Windows + 20% Mac) - (MobileDeviceOnly%)), with "target audience" being the complete programming newbie, and the "actual audience" being comprised of of a rich mixture of the "target audience" coupled with a good number of folks with a lot of technical savvy.

 

Perl is going to be easy to work with for everyone, aside from getting the  required non-Windows SheBang line correct, and using any non-standard modules. I think ActiveState Perl was a great choice, and probably should have been pitched harder to Mac (and even Linux) users, even though their systems have a Perl pre-installed. If and when it comes time for modules, having everyone using ActiveState Perl will be a good thing. FWIW, I just wrecked a perfectly good Mac system trying to get a good way to suggest that users could install CPAN modules, and somehow sending a newbie off to MacPorts et al is just not something I feel good about.

 

I do agree that she show shoudl cater to as broad of an audience as possible, as universally as possible, and that Perl should fit the bill nicely!

 

TJoe

Link to comment
Share on other sites

Lee Crocker Saying that Windows is a tiny player in the world of OS's because it is installed on desktops is as crazy as saying that Unix tiny player in the world of OS's because it is installed on servers.

 

Lee, I do not know what you are smoking, but I sure do not want any!

 

Get your fact straight. NO! You are dead wrong in saying that nearly 100% of mobile devices run Linux based Android, or BSD based iOS. You are not even close. In fact, a large portion of the non U.S. market buys (drum roll...) Windows phones. Yup. I hate the thought of that, but it is true Lee. (Did I mention that I hate the twought of that) Go check out the numbers. Be sure to take a look at those huge numbers of phone sales in the South American market.

 

Marriage of Windows Phone API and WindowRT API? nooooooooo!!!

 

The USA hardy comprises of 300 million of the world's population of 7 Billion. While we would like to think of ourselves as #1, and the rest of the world as "3rd world", it's quickly becoming the reverse, and the US market is now looked at as tiny. Manufactures are now looking at the rest of the world to market too, and that trend is growing my leaps and bounds. That Nokia line is not doing badly.

 

And considering Android and iOS to be Unix based is really kind of iffy. Sure, Android and iOS sits on top of it, but programming for either is nothing like coding for Unix. Real programming on Android is really like swimming in a cup of Java, and coding for iOS is like swimming in XCode. If your doing it any other way, then whatever you are using is simply doing the swimming for you.

 

Linux has a big market in servers. Because it is cheap, and because it is good at it. I cringe to think of the portion of servers that are Windows (really), and GOD help anyone running a MAC server (and it IS unix based, and gawd awful).

 

FWIW, know I have a serious distaste for Windows, and have totally lost all trust in Microsoft, but I am broad minded enough to know where the money is today, and broad minded enough to know that too will change too someday (and probably sooner than later), and that although Unix has been a great OS for a great number of years, that too will change someday.

 

You are correct. Folks, do not limit yourself to learning to program for Windows. Things change faster in computing than the wind changes direction in hurricane (and it can change pretty fast on ya). Learn a little of everything you can get your hands on. "C" based languages are a sure bet to start with. Pick up "C", and you can go on pick up almost anything. And remember, it's not what you know, but how well you can find what you need to know. Thats usually what gets the job in programming. Everything in programming changes... fast... very very fast. Whatever is in demand today will be replaced with something else tomorrow. Be flexible!

 

I'm not sure why Linux never took off as a desktop. Perhaps it has been written off by most, yet it's day still has yet to come. I certainly hope that is the case. If so, we just might be able to thank the NSA for it!

 

Lee, you have no idea how much I wish I was typing this in Linux. Help find me a good mouse glide driver with momentum for my laptop, and I will be right there with ya guy! Really!!! Thats all that is holding me back, and it is an accessibility issue, not just a want, but in my case, a need.

 

OK, I have to get back to my real job... tonight, coding makefiles for... umm... oh crap... the Mac and it's dual 32/64 PIC(ky) modes of clangly slight differences... grrrrrr... why can't it be as easy as Linux was last night??? It is Unix afterall.... raking stacking apple and its Steve Jobly NeXTic peculiar... grrrr!

Link to comment
Share on other sites

And I have to get back to my job writing for . . . no OS at all. My current project is an Atmel microcontroller writing to bare metal. What do you mean by "mouse glide driver"? Do you mean a feature on your laptop's touchpad? I use a trackball with my laptop because those touchpads are awful, but I have had to tweak a device driver now and then.

Link to comment
Share on other sites

Lee Crocker 

 

Very cool about the hard metal. Wish I had time to play :)

 

I live attached to a laptop with a synaptics touchpad, often putting in 60+ hours at a stretch. I use a large number of machines (Windows, Linux, and Mac) and control them all remotely via my laptop.

 

I have some serious hand issues, where typing and mouse control are quite difficult (at best).

 

I have the touchpad driver tweaked (under Windows) to do a pretty fair job for what I need, but Synaptics dropped Linux support some years ago, and with that, so too went driver support for momentum based mouse glide (where you flick the mouse a bit, and it glides, first quickly, then slows down as it looses momentum).

 

Simply put, after many years of practice, with a bit of a flick, (and the right settings), I can accurately deliver the pointer anywhere on the screen that I need it.

 

I have tried (without luck) to find a Linux driver that works well for me (my development distro of choice is Mint). As silly as this sounds, I actually run Windows (to get use of the Synaptics mouse driver), then load a VM of Linux Mint to get my real work done!

 

In short, I run Windows to run Linux! Is that not totally crazy (and wasteful)???

 

I have written some code that does momentum based mouse glide as part of a UI (that part is easy enough) but I have never taken it to a Linux driver. I am not sure why it is unavailable. In my searches, I see others posting asking for this feature. I can only assume it is covered by a (stupid) software patent that should have never been issued.

 

As you say, the touchpad (under Linux) ain't so great. In fact, I never really cared for most Linux mouse drivers. They always seem a bit jumpy, and since I mainly code graphics software, mouse control (for me) is a very important part of my livelihood.

 

If you have any ideas, please send them on, and I would consider myself to be your debt for anything that turned out to be a good solution.

 

TJoe

Link to comment
Share on other sites

As I said, I just disable the trackpad entirely and plug in a trackball. Yeah, running Linux under Windows is pretty strange. I do something almost as strange. I run a VirtualBox instance of Windows 7 solely to run a single program: An SDK from Nordic Semiconductor for their Bluetooth chip, which they only make available for Windows. What's strange is that their SDK is a Qt app that they develop under Linux!  But they only make the Windows port available for download.

Link to comment
Share on other sites

Lee Crocker I have had to add the machine name to the desktop of every system, since I remote in via VNC and RDP, most of the machines are clones and all look alike, and sometimes, I end up remoting back into myself (by mistake). It gets pretty colorful as the log in's go into an indefinite loop, eventually crashing all the machines involved.

Link to comment
Share on other sites

 Share

×
×
  • Create New...