HNHacker News
TopNewBestAskShowJobs

AncientPC

248 karma · joined April 26, 2011

submissionscomments
AncientPC··on The world’s two worst variable names
For small scoped loops, I usually just abbreviate to the first letter. I'm not sure how others feel about this, but I think it's perfectly legible:

  for i in items:
    i += 1

  for r in rows:
    for c in columns:
      matrix[r][c] *= 2
AncientPC··on An easier way to create GitHub repositories
GitHub really needs to allow users to control their notifications and activity feed with finer granularity.

There are projects I work on, which I want to appear in my activity feed. There are projects I want to bookmark, which I don't want in my activity feed.

Right now the signal:noise ratio is terrible for activity feed and notifications.

AncientPC··on Reasons to Learn Markdown
That's GitHub flavor. You can also use back ticks and specify syntax highlighting, e.g:

    ```python

    from functools import partial

    def foo(a,b,i):
        if i >= a and i <= b:
            return i**2
        else:
            return 0

    print reduce(lambda x,y: x+y,map(partial(foo,3,7),xrange(1,10)))
    ```
AncientPC··on Reasons to Learn Markdown
I'm going to have to disagree. Markdown is used on StackOverflow, GitHub, Reddit.

While StackOverflow and GitHub users may be tech-savvy, Reddit has a lot of casual users. Markdown is not difficult to pick up, it merely codifies how people type anyway.

Other advantages of using Markdown locally is to separate data from content, legibility, and standard support. Using Pandoc, you can convert Markdown files into HTML, PDF, manpages, etc.

AncientPC··on Reasons to Learn Markdown
If you use vim as your primary Markdown editor, I'd suggest plasticboy's markdown plugin: https://github.com/plasticboy/vim-markdown

I was using vim's default syntax highlighter for Markdown and ran into highlighting issues with unclosed single quotes.

Since a lot of Markdown files use .md instead of .markdown, I'd also suggest adding the file `~/.vim/ftplugin/modula2.vim` containing:

    setlocal filetype=mkd
AncientPC··on How to make your github static page a blog
In the future you might want to consider Jekyll-Bootstrap (http://jekyllbootstrap.com/). It simplifies a lot of the early configuration and adds theming, commenting, tags on top of Jekyll.
AncientPC··on How Wired Published Its GitHub Story on GitHub
At the same time it solves a collaboration issue that is limited to always online services like Google Docs.

I remember my distributed computing professor checking out his LaTeX paper from a Subversion repo that had something like 2000+ commits between himself and other collaborators.

← PreviousPage 4 of 4