Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » Guys this is a really important question

This thread is locked; no one can reply to it. rss feed Print
 1   2 
Guys this is a really important question
Mark Oates
Member #1,146
March 2001
avatar

Should I use the name source/ or src/ in my project's directory tree?

:o:o:o:o

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Felix-The-Ghost
Member #9,729
April 2008
avatar

You put me on the spot. I checked and I use Code/

:-X:-X:-X:-X

My bin/ is also within Code/. Maybe I should isolate them.

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

Mark Oates
Member #1,146
March 2001
avatar

I've been going with:

bin/
docs/
examples/
include/
lib/
obj/
source/
tests/
tools/
Makefile
README.md

But keep going back and forth on source/ or src/

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

bamccaig
Member #7,536
July 2006
avatar

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Elias
Member #358
May 2000

In Android dev, the source code folders for an app all live underneath a directory called src, so seems Google likes that name as well.

--
"Either help out or stop whining" - Evert

bamccaig
Member #7,536
July 2006
avatar

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Arvidsson
Member #4,603
May 2004
avatar

Tradition is the illusion of permanence. I say go with "source"! :)

Elias
Member #358
May 2000

I would say the most important is consistency. So if you go with "source", you probably should use "binary" instead of "bin" and "documentation" instead of "docs" :)

--
"Either help out or stop whining" - Evert

Arvidsson
Member #4,603
May 2004
avatar

And vice versa. inc instead of include :)

OnlineCop
Member #7,919
October 2006
avatar

By that logic, tools/ should be 2ls/.

amarillion
Member #940
January 2001
avatar

When it comes to directories, I choose src and include

But when it comes to naming variables however, I've got another important question. Do you pair src with target or with dest?

Elias
Member #358
May 2000

I pair it with both, target is the enemy my unit is shooting at while moving to its destination.

--
"Either help out or stop whining" - Evert

Neil Roy
Member #2,229
April 2002
avatar

I have always understood src as being a standard.

OnlineCop said:

By that logic, tools/ should be 2ls/.

Everyone knows that should be tls! ::)

---
“I love you too.” - last words of Wanda Roy

Specter Phoenix
Member #1,425
July 2001
avatar

I'm just a lazy typist when it comes to directory names and I would have named mine as so:

bin/
docs/
ex/
inc/
lib/
obj/
src/
tests/
tools/
Makefile
README.md

André Silva
Member #11,991
May 2010
avatar

If one shortens "documents" to "docs", then surely it stands to reason to shorten "source" to "src". But what if one keeps "examples" unabbreviated?

You know what, just go with the one that requires less typing. A quarter-second saved is a quarter-second earned.

Mark Oates
Member #1,146
March 2001
avatar

If one shortens "documents" to "docs", then surely it stands to reason to shorten "source" to "src". But what if one keeps "examples" unabbreviated?

expls, duh! ::)

--
Visit CLUBCATT.com for cat shirts, cat mugs, puzzles, art and more <-- coupon code ALLEGRO4LIFE at checkout and get $3 off any order of 3 or more items!

AllegroFlareAllegroFlare DocsAllegroFlare GitHub

Edgar Reynaldo
Major Reynaldo
May 2007
avatar

Felix-The-Ghost
Member #9,729
April 2008
avatar

==========================
<--- The ghost with the most!
---------------------------
[Website] [Youtube]

bamccaig
Member #7,536
July 2006
avatar

The examples directory is one that is going to be used relatively rarely. The source directory on the other hand will be used all the damn time. As with most things, don't bother optimizing/obfuscating things that don't require it. This explains why we have examples or images, but src. It doesn't necessarily explain include, but fuck you. :P That said, another advantage specifically for bin, lib, obj, src and tests is that you can type each with a single hand on a QWERTY keyboard without having to move much. That's probably a bigger advantage than just the length.

Erin Maus
Member #7,537
July 2006
avatar

I use source to be consistent with include.

But I don't have a strong opinion one way or the other.

---
ItsyRealm, a quirky 2D/3D RPG where you fight, skill, and explore in a medieval world with horrors unimaginable.
they / she

Bruce Perry
Member #270
April 2000

sauce/

--
Bruce "entheh" Perry [ Web site | DUMB | Set Up Us The Bomb !!! | Balls ]
Programming should be fun. That's why I hate C and C++.
The brxybrytl has you.

Trezker
Member #1,739
December 2001
avatar

magic/
gremlins/

bamccaig
Member #7,536
July 2006
avatar

 1   2 


Go to: