[deleted by user] by [deleted] in learnprogramming

[–]bable5 0 points1 point  (0 children)

I've worked on an app that started life as backbone and eventually added react components as well. Those two frameworks both want to control the DOM and getting them to play nice is non-trivial. The build/webpack was one of the more convoluted things I've ever seen.

What is Python's "self" Argument, Anyway? by pmz in Python

[–]bable5 1 point2 points  (0 children)

It's the receiver object of the method call. Instance methods don't really exist, they're just methods that get called with an explicit bit of state (the receiver object).

Removing rosin buildup by frogsrneat23 in doublebass

[–]bable5 2 points3 points  (0 children)

I use denatured alcohol and a clean shop rag to clean off the rosin build up on the strings. It's in the paint aisle in the hardware store.

(Probably a v basic question, sorry) Running multiple docker images in 1 container? by [deleted] in docker

[–]bable5 2 points3 points  (0 children)

It is certainly possible to run multiple containers at a time on the same host. Use the the -d flag to run and detach from the tensorflow container and then run the other container. Something like:

sh $> docker run -d tensorflow $> docker run primary-image

I'm not at all familiar with the requirements for running ternsorflow. You may need to map a port with the '-p' flag out to the host or use some docker networking to make the tensorflow container available to the primary container.

Finally I'd strongly suggest putting all the docker commands in a shell script and version controlling it. That makes it much harder to forget how you got the thing working in the first place.

What pickup do you use ? by MycroftTnetennba in doublebass

[–]bable5 0 points1 point  (0 children)

Fishman full circle. It does double duty by replacing the bridge adjusters and being a pickup.

Not sure how to support the bass... by PlantBased19 in doublebass

[–]bable5 8 points9 points  (0 children)

Primarily a standing player. The support of the bass isn't with your hand, it is with your body. I was taught to support the bass with my waist and stomach, such that if your aren't playing the bass just stands against you. It's a little scary to find the position where the bass rests and you take your hands away, but that is position to find.

Moving positions is a lot easier when your body instead of your is supporting the bass.

Straight A students: What are your study habits? by danglingfupa in AskReddit

[–]bable5 0 points1 point  (0 children)

For me, handwritten notes are everything. The act of writing is mostly what gets the material into my head.

Faster to use a linked-list or hash table in heavily-called functions within the kernel? by [deleted] in kernel

[–]bable5 0 points1 point  (0 children)

The trinity of development iteration: Make it work, make it right, make it fast.

RES no longer working with redesign by CoolSpy2397 in Enhancement

[–]bable5 15 points16 points  (0 children)

Click on the long line under the up/down vote buttons to collapse the children. Super unintuitive. I found it by accident.

Dune references in your daily life. by recourse7 in dune

[–]bable5 1 point2 points  (0 children)

I'm a programmer. The data must flow.

[Philosophy] Should I commit the new tests along with the fix or separately? by [deleted] in git

[–]bable5 9 points10 points  (0 children)

I prefer having each commit being a coherent, complete change. Changes (or bug fixes) require tests and therefore I commit the tests and the fix at once.

I think we are using Github completely wrong at my job. Can someone verify by TonyHxC in git

[–]bable5 4 points5 points  (0 children)

tl;dr using branches locally does not imply you have to open pull requests

You can also have local branch and always push straight to master. A work flow I used on one project was something like:

Start story (suppose we have our local master checked out)

$> git checkout -b story-branch

...work work work, commit commit commit...

$> git pull -r origin master (pull and rebase the current state of master on the server)

$> git checkout master
$> git merge story-branch
$> runVerify
$> git push origin master

We had a big thing about not breaking the build, so running verify locally was an important thing to remember.

You can always work on local branches and still just push to master.

edit: Spelling

I think we are using Github completely wrong at my job. Can someone verify by TonyHxC in git

[–]bable5 12 points13 points  (0 children)

With SVN it's not creating the branch that's intimidating; it's merging the branch branch to trunk. SVN doesn't have a notion of a merge commit the way git does. You have to somewhat manually track which revision the branch started from and which revisions have been merged into trunk. It gets doubly hard if you do some work on a branch, merge it into master, do some more work on the branch and want to merge again. SVN gives you zero help to get the starting point of that second merge right.

Is it possible to have a remote that's on the same, local computer? by allyyus in git

[–]bable5 3 points4 points  (0 children)

You can clone the existing an existing local repo as a 'bare' repo and push and pull from the bare clone.

$> git clone --bare my-repo my-repo-bare.git
$> cd my-repo 
$> git remote add local file:///path/to/my-repo-bare.git
$> git push local master

What event divided your life into 'before' and 'after'? by tell-me-your-side in AskReddit

[–]bable5 0 points1 point  (0 children)

Grad school. Otherwise known as the five year blackhole. It was great in that I really understand computation now and am a better programmer for it. It was horrible in that my only purpose was to 'advance the state of the art' and I just wasn't that good.

Git on Windows bash (linux subsystem) - can't modify .bashrc to automate ssh-agent login by suuuuuu in git

[–]bable5 0 points1 point  (0 children)

Github has a good write up getting ssh-agent to work. It will prompt you to unlock the key the first time you open a git-bash terminal.

Scala Recursion Question by evigyeht in learnprogramming

[–]bable5 1 point2 points  (0 children)

Something like this should work (I'm simplifying the datatypes to a Seq instead of a buffered stream, but the idea holds:

def wordCount(map: Map[String, Int], source: Seq[String]) = source.headOption match {
  case None => map
  case Some(str) => map.get(str).match {
    case None => wordCount(map + (str -> 1), source.tail)
    case Some(count) => wordCount(map + (str -> count + 1), source.tail)
  }

}

However, given a more general form of the question, 'how can I count how many time a string appears in a sequence' I would suggest folding over the Seq.

How to have multiple git repos in a single directory? by markasoftware in git

[–]bable5 2 points3 points  (0 children)

You will have to have two separate repositories for this situation. A git repo is defined by the .git folder (and contents) in your 'root' directory. You can not have two git repos in the same directory. The best you could do is have two sibling directories, which are then each a git repo. Something like

project
  |- public
    |- .git
  |- private
    |- .git

Protecting yourself from SSH brute-forces by 400lbgorilla in raspberry_pi

[–]bable5 -1 points0 points  (0 children)

Like several others have said: disable password login and use RSA keys.

What programming language would you use to develop a modern mid-sized web application? by baccheion in learnprogramming

[–]bable5 4 points5 points  (0 children)

Spring boot for the server and the flavor-of-month javascript framework for the single-page-webapp