11 ms·
My God, it's full of yaks
- swagtricker 10y agoYep. There's a reason after 20+ years that I bought this T-Shirt: https://teespring.com/maksesoftwarebetter2 https://teespring.com/maksesoftwarebetter2
- RowanH 10y agoGreat find. Okay so if 5 other people who feel this aptly visually depicts their daily lives and could click reserve on the hoodie version I would be stoked ! :)
- epimetheus 10y agoI signed up for notifications, it's available now, for 3 more days.
- mkesper 10y agoMacOS does not seem to be very developer friendly.
- pyre 10y agoI'm curious what the failure of MacOS was in this instance. This comment at face value seems like you're trolling.
- x0x0 10y agoThe intermixing of macos python and brew installed python has been painful for me in the past. Specifically, I spent hours and hours trying to fix import matplotlib.pyplot producing ImportError: cannot import name _thread but only in ipython, not the interpreter. (HAHAHAHA fuck you developers). A ton of googling and swearing produced the fact that a package named six that does god knows what was being read out of /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.pyc instead of /Library/Python/2.7/site-packages rm -rf'ing the former path fixed things, but fuck only knows what else I may have broken. Just because I want to plot things from ipython. ps -- 6 months ago the above used to work. Why did it stop? I have no bloody idea. But this consumed multiple hours of my life.
- mason55 10y agoSeems like this would have been straight forward with a virtualenv?
- geofft 10y agoYup. Really, no OS is developer-friendly if you're going to mess with the system Python interpreter, because the system Python interpreter exists to serve system software written in Python. You can easily get yourself into very similar problems with Debian or Fedora or whatever else. Install a virtualenv, and on OS X, maybe install Python from python.org, and then everything works amazingly.
- x0x0 10y agoAfter I learned more that was probably the right thing to do, but I'm not a python dev. I just want to use sklearn, pandas, and associated tools. I'm not sure what the smooth path to doing that is. At various times people recommend macports, brew, anaconda, and so on... Note that compiling numpy from source sucks, and I'd much rather someone else do so.
- tanlermin 10y agoAnaconda. Its the best game in town right now.
- AlexCoventry 10y agoI have found Anaconda to be substantially slower running on OS X than running on the same hardware in a docker container running on boot2docker.
- geofft 10y agoThere are now wheels (binary distributions of Python modules) of numpy, scipy, and scikit-learn for both Linux and Mac OS X, so it should just be a matter of `virtualenv /tmp/v` (or wherever), `source /tmp/v/bin/activate`, `pip install -U pip` to make sure your pip is new enough to handle wheels, and `pip install numpy scipy scikit-learn`. Nothing gets built from source. Unfortunately the same can't (yet) be said for pandas; `pip install pandas` at this point will try to compile it. Actually acquiring virtualenv on OS X seems not to be super straightforward, especially if you want to use the system Python interpreter. The best option seems to be to `brew install python`, and then `pip install virtualenv`. Or download Python from python.org, and maybe get Python 3 while you're at it.
- newman314 10y agoTBH, it really is not dev friendly due to odd/old versions, having to install brew etc. Thus, I use my Mac as a fronted with business apps but all dev is done on Linux VMs. I like the separation and avoid all that hair pulling. Now, dealing with proprietary HW is a whole other can of worms. I spent 3hrs last night trying to load a LE cert into a Polycom phone but had ZERO success getting the phone to use it instead of the factory cert. ARGH.
- swagtricker 10y agoI believe part of the problem for Ron there is a.) speed of the community & lack of communication, b.) lack of consistent tool isolation. You notice he's using RVM (while most of the Ruby developers I know have moved to rbenv due to better support) and that it was out of date. Also, he had the foresight to isolate his Ruby tooling by using rvm (good on 'ya, Ron!) for bizarre system dependencies, but did not chose to use a similar Python environment manager strategy such as pyenv of pythonbrew (for suffering the same damn problems). I sincerely empathize with him, but some of this can be argued as the cost of doing development n! generations past we recognized the impact of 'internet time'.
- bovermyer 10y agoI have yet to have a problem with it. macOS seems to have the right balance between convenience and hackability.
- gue5t 10y agoWhich components are hackable? The closed-source kernel? The closed-source userspace libraries? The Internet service infrastructure (iCloud &c.)? The outdated versions of open-source software? You have root, and you can build your own enclave of open-source code doing as you desire, but this is true of pretty much any system--certainly it's true on Windows, at least.
- bovermyer 10y agoYou answered your own question. I didn't say macOS was more or less hackable than other OSes. Also, I like many of the convenience features. Linux is many (good) things, but up until this point in time, "convenience" is not a word I would associate with it. macOS and Windows own that world.
- pnathan 10y agoI have things to do that don't include wasting days of my life because Bozo the Developer updated something and expected downstream to just cope with the issues. Certain communities live on that behavior; its a waste of my time churning. I would like to point to the Rust developers as ones fostering a more deliberate culture with tools and practices that manage change without exploding downstream.
- reitanqild 10y agoJava is quite nice this way as well if you can get away with it.
- bduerst 10y agoWhile this isn't a solution for many, I usually do development on a Linux VM for these exact reasons. Something not working? Boot a new VM from scratch, install necessary packages, and run it. Usually faster than a couple days of internet searching.
- theoh 10y agoGiven the tendency to use containers these days for various reasons, there's presumably an argument that you could just make that the expected practice. It's still more principled than just downloading and running a single binary unikernel in the container, though exactly what you would gain is a mystery to me (Gentoo points?)
- colemickens 10y agoI've gotten to the point where I scoff at projects that expect me to install hours of crap and dependencies at specific versions and can't bother to encode it as a Dockerfile. Like, come on, you had to figure out how to get this installed, eventually you're going to have to do it again, why not document it with code (Dockerfile) and never do it again? Ironically, just watched someone whine about open source projects using Docker for dev on the 19th and then praising Docker for basically the same thing on the 22nd. Docker isn't magic and no one says it is and people yelling against that strawman are just making themselves look ignorant.
- beat 10y agoThe developer's response to infrastructure as code. :) I use Vagrant for just about any development task these days, just because I can take all those arcane bits of knowledge, shove them into an ansible playbook (or whatever provisioning tool you like), and hopefully never have to fuck around with them again. Shave the yak once. Write a script that shaves the yak for you next time.
- selestify 10y agoEven with Vagrant, don't you want to run your own native IDE? And if you're doing that, the IDE probably wants to look at your dependencies to figure out what your code is doing. Which means you need to set up the whole thing locally anyways. At which point it appears you've defeated the purpose of setting everything up inside Vagrant.
- hellofunk 10y agoIt really is full of yaks! [0] [0] https://github.com/search?q=yak&type=Code&utf8=%E2%9C%93 https://github.com/search?q=yak&type=Code&utf8=%E2%9C%93
- robohamburger 10y agoThis is why I have always been scared of GAE. Seems like the only thing that works precisely like GAE is GAE :) True unit tests though ought be runnable outside GAE since your code should not be coupled with GAE if it is unit testable. You still need to test your code correctly integrates with google app engine. I would take a look at tox and py.test for testing in python, these are what I use in my normal linux environment.
- nickbauman 10y agoGAE has some rough edges, to be sure. But once you know about them, the really hard stuff is dead easy to test. The official test stubs are awesome to work with. I live or die by them: they've never let me down. If it works with the stubs, it has always worked with the real thing.
- robohamburger 10y agoThat is good to hear! I will check out GAE next time.
- nickbauman 10y agoHere's a link to the python stubs: https://cloud.google.com/appengine/docs/python/tools/localunittesting https://cloud.google.com/appengine/docs/python/tools/localun... Here's the Java stubs: https://cloud.google.com/appengine/docs/java/tools/localunittesting https://cloud.google.com/appengine/docs/java/tools/localunit... I wrap the hell out of the java stuff on App Engine because Java is so pedantic. It ends up looking like this: https://github.com/nickbauman/cljgae-template/blob/master/resources/leiningen/new/cljgae_template/fixtures.clj https://github.com/nickbauman/cljgae-template/blob/master/re...
- phlakaton 10y agoI don't want to derail a splendid rant on yaks, but for GAE users running into this little problem of how to test and run: We use OS X for development, for the most part, but Linux works well too. We use nose2 with the following plugin to run unit tests: https://github.com/udacity/nose2-gae https://github.com/udacity/nose2-gae . It assumes your GAE SDK is installed at /usr/local/google_appengine. For API tests, we generally create a webapp2.WSGIApplication object during setup, configured with the routes we want to test, and we send webapp2.Request objects to that application using request.get_response(wsgi_app). Hope that helps!
- nickbauman 10y agoRon is right: it's a mess. But I have a tried and true recipe for app engine python and java both. First, download the Linux cloud SDK (works fine on a mac). Then download the python google appengine SDK. Put the appengine SDK inside the platform directory of the cloud SDK. Add this to your python path. I use this framework for Python: https://github.com/agostodev/substrate https://github.com/agostodev/substrate I use this Clojure template for Java: https://github.com/nickbauman/cljgae-template https://github.com/nickbauman/cljgae-template
- dkarapetyan 10y agoThis is nothing. Ramp-up time at any software shop with more than 2 engineers is months. He had a really easy time from where I stand.
- BurningFrog 10y agoYou need to get into better software shops!
- dkarapetyan 10y agoThey don't exist. Software is an awful business.
- pbackx 10y agoYou Python developers have it easy :) Developing in Java on AppEngine adds an additional herd of yaks to the meadow.
- skybrian 10y agoThe Go variation seems pretty good, though. (Or maybe I've just gotten used to it?)
- rspeer 10y agoI just recently installed a piece of software written in Go, from source, on Ubuntu 14.04. It wasn't so nice for a non-Go-programmer. The instructions wanted me to download a binary tarball of Go and untar it directly into /usr/local. As if I would never need to uninstall it. Apparently even though the version of Go has changed several times since Ubuntu packaged it, they think this will be the last version ever, or something? I ended up hunting for an Ubuntu PPA that had it instead. Of course all the accepted answers on Stack Overflow point to PPAs that don't exist anymore. A comment sitting at some tragically low score saying "hey, try this one instead?" pointed me to something that worked. I think you dealt with it the first time and you've gotten used to it. (And maybe there's some nice way to get a newer version of Go when you already have Go.)
- skybrian 10y agoI'm not sure I understand the problem. Renaming the old directory to go.old and installing a new one seems pretty easy to me, but apparently not? BTW, you can put the Go SDK anywhere you like, as long as you set GOROOT. See "custom location" on https://golang.org/doc/install https://golang.org/doc/install
- rspeer 10y agoFor reference, I'm referring to the directions you get at the top of the search results when you type "installing go on ubuntu" into Google. The directions link to Stack Overflow, though I don't know how the search result picked out these steps, as Stack Overflow has a different accepted answer that doesn't work. Intervention by Google, possibly? I didn't realize it would only make one directory. That is reassuring. I would still prefer packages as a way to install, upgrade, and remove Go, instead of remembering months from now that Go is installed differently from everything else and there's this directory I need to mess with. Now, that all would have been more intuitive as something to do in my home directory. If it only needs one directory and it can go anywhere, why would these Google-blessed directions tell me to mess with /usr/local? I believe you, I just assumed that people would be averse to messing with system files without a package if there were any other option. (I think of Python, where the one thing you're supposed to do with your system Python is use virtualenv to install a non-system Python. Which is another example of something that's only clear to veterans of the language.) Now... this is a problem with a whole lot of programming languages. Programming languages change. Their libraries change way too fast for an OS-approved package manager to keep up, so you need a package manager for your language. And that changes too, and nobody designs their packaging system to smoothly update to a better packaging system designed by someone else. Maybe one day every programming language and OS will unite under one purely functional packaging system and never replace it... haha, no.
- wheaties 10y agoThe problem here is MacOS. The amount of work around and hacker I've had to do on Mac far exceeds anything on Linux and more surprisingly Windows. Let that sink in, it's easier to get things to work on Windows than Mac.
- madelinecameron 10y agoWindows is a nightmare when it comes to nodejs and pip. I ended up abandoning Windows when I was playing on my Mac and basically got things working instantly while I struggled to get the right incantations / pile of dev tools to do what I want. Ubuntu saves me so much time. (Also for some reason, Windows hates my graphics card and produces terrible sound in my BT headphones. Somehow a multi-billion company can't figure out BT while an open-source project can)
- blendo 10y agoNext month Windows 10 will ship Ubuntu as part of what they're calling "Windows Subsystem for Linux" -- bash, apt-get, etc. https://msdn.microsoft.com/en-us/commandline/wsl/faq https://msdn.microsoft.com/en-us/commandline/wsl/faq It's actually kind of revolutionary.
- madelinecameron 10y agoI still probably will stick with Ubuntu as my main system. I have Windows 10 installed on a separate drive for when I want to play games but even then, I have to cater to Windows. Make sure to save constantly because sometimes Windows decides it is too much and causes my graphics card to flip. And I also have to plug my headphones in or else I get static-y mono sound. Admittedly I could probably go buy "For Windows" headphones and figure out what is going wrong with the graphics card... but I shouldn't have to. We are talking about the latest operating system whose ancestors have been dominant across the world for decades, developed by one of the largest companies in the world. How are they getting it wrong?
- shawnz 10y ago
- twic 10y agoOne lesson i had beaten into me at an old job is that software should come with a self-contained reproducible build with an absolute minimum of external dependencies (which might be none at all). If GAE provided a zip file with everything in it, all set up and ready to go, you could download that and get working. But making a self-contained build is hard, so nobody ever does it. Java has got usefully close in recent years. You can download and build a Gradle project with only a JDK and a shell installed, plus HTTP out to the internet; the project can (should!) contain a standard wrapper script which can download the right version of the build tool, and the build tool can then download the right versions of the dependencies and do the build. The downloads are cached locally so you don't download the internet on every build. The wrapper script only does straightforward stuff, so it doesn't require a particular shell or version, and the JVM changes slowly and safely enough that you can get away with being pretty sloppy about versions (ie any Java 8, 2014 - 2017+, will do). There's no dependency on having some SDK installed, or some version of the runtime, or some build tool, or some package manager, or any other bits and bobs. Just a shell and a JDK. You don't have the problems listed in the article, and you don't have to invest time in avoiding them. The next step would be for the wrapper to download the JDK itself, but i think that's unlikely to happen, due to bandwidth and licensing. Once you're in the build tool, there are strong conventions about what's where. The 'build' task should do everything; 'check' should run every kind of validation possible; 'assemble' should build every artifact. Ideally, none of them should require any setup, although that requires some discipline on the developer's part. I don't know of any good way to set up things MySQL or RabbitMQ if you need those for integration tests, which is definitely a problem. Perhaps we need a Docker plugin, so in my build i can say "to run the integration tests, download and start the following images, and inject the container IP addresses into the tests like so". The usual way to get around this is to use pure Java in-memory options for integration tests (eg H2 for a database, maybe something like HornetQ for a message queue), and you can get those like any other dependency, with no manual setup needed. Sorry for the ramble. tl;dr yaks are bad, but there is hope for canned pre-shaved yaks.
- jwhite 10y agoHaskell's stack tool is aiming for something like this. All you need is the stack binary. stack will download GHC for you at a given version, and fetch your dependencies for you. The dependencies are locked to a fixed snapshot of versions. There are curated snaphots, with an LTS model that guarantees all packages in the snapshot work together, so you're insulated from package authors randomly breaking API compatibility on you, and you can upgrade to newer LTS snaphots when you're good and ready. http://docs.haskellstack.org/en/stable/README/ http://docs.haskellstack.org/en/stable/README/
- justinlardinois 10y agoI can echo GAE being hard to work with at times. I did an app for a school project and was using Flask. At the time App Engine only had webapp and web2py available as frameworks (maybe it's different now) so a bit of shoehorning was necessary to get Flask working, and Flask was relatively young at the time so there weren't a lot of examples out there of the two technologies being used together. I recall having a lot of trouble working with GAE's file upload API.
- mikelward 10y agoI tried to reproduce to file some bugs, but the docs Ron linked to and the datastore_test.py[1] they in turn link to don't do "import webtest", so I guess the docs have been updated recently. A quick search suggests webtest is part of Pylons[2]. But Pylons isn't listed as a built-in third-party library[3]. So I'm not sure if there's anything to fix. 1. https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/appengine/standard/localtesting/datastore_test.py https://github.com/GoogleCloudPlatform/python-docs-samples/b... 2. http://docs.pylonsproject.org/projects/webtest/en/latest/ http://docs.pylonsproject.org/projects/webtest/en/latest/ 3. https://cloud.google.com/appengine/docs/python/tools/built-in-libraries-27 https://cloud.google.com/appengine/docs/python/tools/built-i...
- ianbicking 10y agoThe Pylons maintainers maintain WebTest, but it's an independent library.
- X-Istence 10y agoThe Pylons Project is a larger organisation that maintains a lot of open source software, including webtest, Pylons is ALSO a web framework, but that is also unrelated to webtest. In the authors case, webtest should have been installed separately, rather than using it from within the cherrypy source code, which seems to vendor webtest.
- cwp 10y agoThis is why I love nix so much. Getting a dev environment set up with nix is the usual amount of hassle. The difference is that nothing ever works by accident. Therefore, once it does work, I know I've captured all the dependencies and configuration, and I can reproduce the environment wherever I want.
- optforfon 10y agoI'm trying to read the docs and understand how nix works. It seems really fantastic but at the same time so radically different that it seems like it would collide with a lot of built in assumptions of Linux development. For example, does nix play nice with CMake or config files? ie. I can just point them at the packages in /nix/ and it'll work? Or for example, I often find myself wanting to have a few different version of OpenCV around (with different build flags) - but all version 3.0. Nix seems to make a new hash/folder when the dependencies change. Can you make make a new build/folder when the dependencies stay the same? (or specify to NOT make a new folder and to overwrite the previous compiled version - ex: you fix a bug) I have a ton of overlapping dependencies between contracts and projects and this would be a cool tool to keep it all organized (right now in my workflow each project/contract would have it's own copy of OpenCV.. which is a bit of a mess) (I'm totally cheering for this - hope it becomes mainstream, just wondering how "prime-time" is it)
- aristidb 10y agoNix supports CMake fine. In my experience adding new packages is not too hard as long as they're not GnuCash 2.6 ;) Any change will lead to a new output folder, there is no option of reusing them. Why not just give it a try in VirtualBox to see for yourself how far along it is?
- optforfon 10y agoI guess I understand why it has to make a new folder - it just seems that that would means you have to redirect (and relink) anything that uses a recompiled library. Okay, I'll definitely start to dive into this. I was asking around to see if it fits my workflow. thanks!
- pcr0 10y agoI'm glad Docker solves this for me, at least at the company I just joined. One of their microservices has tons of dependencies, including npm modules, databases, testing frameworks, and so on. Most people would scoff at using Docker as a glorified VM, but it honestly does the job, with much less overhead vs VMs.
- iLemming 10y agoyeah it's a mess. Modern developer has to know and understand language semantics and ecosystems of Python, Ruby, Java, C, Lua, Javascript and sometimes these are not the main languages of her work. Add to it things like Clojure, Erlang, C++, C#,F#, Purescript, Typescript, Elm, Mathlab... you get the idea
- X-Istence 10y agoAs the current maintainer of WebOb it pains me to see Google App Engine shipping 1.1.1 by default, and 1.2.3 as one that the user can select.
- SolarNet 10y agoOne of my jobs as the person usually responsible for setting up and writing the core bits of new projects at my company is to make a build that just works. All most all of our core (e.g. serious) projects consist of the following steps: * git clone * setup.{bat, sh) * Open IDE of choice. * Click build button. (or run make) The only dependencies are git, a default PC OS install (Linux, Windows, Mac), and your IDE of choice. Any project or system that can't provide that easily is too complicated by far, our non-technical CEO and sales staff can build and run our code without any help.
- digi_owl 10y agoSeems to me the problem is layers of "automagical" systems for locating dependencies. That in turn end up clobbering each other in various ways.
- Tyr42 10y agoI don't want to be harsh on the buy, but some of those dark corridors were in fact marked as not where you wanted to go. >To eliminate this warning, please install libyaml and reinstall your ruby. This line should make you think of using brew or apt-get or whatever to grab libyaml first. A few clues, the lib prefix is much more common for native libraries rather than interpereted ones. Second, the request to re-install Ruby means that this is a dependency that is required at compile time for Ruby, which rules out anything you'd install as a gem. But maybe I just have shaved too many yaks and know what what already.
- tamana 10y agoI wouldn't expect anyone to know those details, but I would expect someone to follow the directions if they want it to work.
- mcguire 10y agoBefore you start trying to draw conclusions about the general state of development, consider that Mr. Jeffries... "Some further very simple tweak, which I no longer remember, and the test ran … and did nothing. That’s not too surprising, I guess, because there’s no if __name__ == '__main__': "which, I believe, means that no one calls the testrunner. "You’re supposed to know that!" ...is also the fellow who had some trouble with Sudoku[1]. I say this not as an attack on Mr. Jeffries, but as a way of pointing out that shaving yaks is easier if you know to start with shears and not a hatchet. [1] http://ronjeffries.com/xprog/articles/oksudoku/ http://ronjeffries.com/xprog/articles/oksudoku/
- tamana 10y agoIf I read that right... that Sudoku sllver only got as far as becoming a Sudoku board API, aka a object wrapping an array? And the article spends more bytes talking about whether some code is YAGNI, than the amount of bytes in the code itself?
- mcguire 10y agoAs far as I know, yes, that's where he gave up.
- userbinator 10y agoI think the real problem here is the rise of huge libraries/frameworks/SDKs along with all the dependencies they bring, and the dependencies those dependencies need, etc. The problem isn't in code you wrote and should easily be able to debug, it's in the orders of magnitude more code you didn't write but depend on. There's too much complexity, too many moving parts, and it creates a fragile system in total. But I think it doesn't really need to be that complex and involve so much yak-shaving. Around 10 years ago, when I wanted a personal web app of the similar CRUD type, I opened a text editor, browser, and the PHP documentation, and it was done in a few hours. Uploading a single file to the server was all that I needed to get it working and test it. I thought I’d write this article about my experience, to try to draw some learning from it. I created the folder and the file, typed in the YAML and the first paragraph, and started Jekyll to build the html as usual. Would it have been easier and faster to just write the HTML directly and upload it to the server instead of requiring an elaborate (despite hidden behind one command) "build" process that again depends on a large infrastructure of software? Me, I just want to write programs, mostly small, that do things that may be worth writing about. And I want to write articles like this one, convert them to HTML, add them to a few indexes, and put them on my site My advice is to avoid all the complexity and big systems that claim to do just about everything while requiring plenty of configuration and dependencies, if all you need is something that could be much simpler. Otherwise you are "making more yaks to shave".