Internet Use FAQ

NOTE: The guidelines provided here are "in view" of UCSD's Academic Integrity guidelines as well as this course's Academic Integrity guidelines provided on the home page of this syllabus.

Modern software development is heavily dependent on tools, none more important than the internet itself.  Almost every technical question you have about your project or the labs has already been answered online.  A skilled software developer is expert at using the internet to get her questions answered.

The gold-standard article on this topic is Eric Raymond's How to Ask Questions the Smart Way.  (Eric Raymond is the God Father of Open Source.)  You should read this article, in addition to what's below.  What the article clearly conveys is that my advice is the standard for professional developers.

(This web page strictly concerns how to productively and legally search the internet to solve coding problems.  For AI generators like GitHub Copilot, see, for example, Matt Rikard's How to use GitHub Copilot Effectively.  And, again, see the course's Academic Integrity guidelines.)

Before asking for help, you should try to find the answer for yourself.  Other skilled developers, if asked a question, will parry, asking "What did you find on Google?"  The term often used among developers is "do your homework", which means, come prepared.  They don't want to invest a lot of time providing a from-scratch answer.  They want to build on what you know.  Also, if no one is around to answer your question immediately, this will often be the fastest way to get your question answered.

However, search should not be used in lieu of thinking.  Sometimes it is faster to solve the problem yourself, often with a combination of:

For those of you who took CSE 15L (the CSE 12 lab), you have already begun developing these intellectual problem-solving tools.

How to Search

Searching is typically quite simple.  For example, if you have a bug,  you should paste in key parts of your error message, along with the programming language and/or environment you are using.  In this class Java is the language, and Android is the environment.  Suppose this is the bug I get while I'm trying to implement a layout:

05-07 13:58:26.917 22363-22363/com.example.apple.coupletone E/AndroidRuntime: FATAL EXCEPTION: main                                                                               Process: com.example.apple.coupletone, PID: 22363                                                                               java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.apple.coupletone/com.example.apple.coupletone.MainActivity}: android.view.InflateException: Binary XML file line #21: Binary XML file line #21: Error inflating class android.support.design.widget.TabLayout                                                                                   at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)                                                                                   at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)                                                                                   at android.app.ActivityThread.-wrap11(ActivityThread.java)                                                                                   <... about 50 lines of meaningless error message ...>                                                                                   at android.os.Looper.loop(Looper.java:148)                                                                                    at android.app.ActivityThread.main(ActivityThread.java:5417)                                                                                    at java.lang.reflect.Method.invoke(Native Method)                                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)                                                                                 Caused by: java.lang.UnsupportedOperationException: Can't convert to dimension: type=0x10                                                                                   at android.content.res.TypedArray.getDimensionPixelSize(TypedArray.java:666)                                                                                   at android.support.design.widget.TabLayout.<init>(TabLayout.java:284)                                                                                   at android.support.design.widget.TabLayout.<init>(TabLayout.java:261)                                                                                   at java.lang.reflect.Constructor.newInstance(Native Method)                                                                                    at android.view.LayoutInflater.createView(LayoutInflater.java:619)                                                                                    at 

...

android.view.LayoutInflater.inflate(LayoutInflater.java:374)                                                                                    at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:276)                                                                                    at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:139)                                                                                    at com.example.apple.coupletone.MainActivity.onCreate(MainActivity.java:27)                                                                                    at android.app.Activity.performCreate(Activity.java:6237)                                                                                    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)                                                                                    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)                                                                                    

...                                                                                   

at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)                                                                                    at android.os.Handler.dispatchMessage(Handler.java:102)                                                                                    at android.os.Looper.loop(Looper.java:148)                                                                                    at android.app.ActivityThread.main(ActivityThread.java:5417)                                                                                    at java.lang.reflect.Method.invoke(Native Method)                                                                                    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)                                                                                    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)

I've highlighted the important pieces, although we won't paste it all in.  How do I know they are important?  They are fairly specific and related to what I'm trying to do, achieve a layout.  The key phrases seem to be: android,view.InflateException, TabLayout, Can't convert to dimension, and type=0x10.  I'm leaving out "error" and "inflating" because these are less specific than "InflateException".  I don't need to say Android or Java because the exception I'm citing is likely to be unique to the language and environment.  When I do this search, I do get many good hits, but I'll have to read a lot to see if one of these problems are similar enough to mine.

Tweaking Your Search If it Doesn't Work at First

It's rare that the answer you are looking for is on the second page, so if you don't find it on the first page, redo the search by varying the terms a bit:

Best Sites

Not all resources are equally dependable.  So one way to know you're on the right track is what sites you're hitting.  You might even initiate your search on these sites, but Google is often better at searching a site than a site's own search bar!  Here are a few top sites for coding:

StackOverflow.com:  There seems to be no problem that hasn't been discussed and solved on this site.  Amazing.  Post here if you can't find an answer anywhere else.  But posting here is like posting on Piazza - you have to do your homework first.  And unlike on Piazza, you might get flamed if you haven't done your homework, and get a bad reputation.

Developer.Android.com:  This is the official site for Android, so you'll find the downloads and APIs you need here.

Developer.Google.com:  For Google's server-side and JavaScript API's, this is the official place to go.

But, if you start your search on Google (or Bing), you not only get better search on these site, you leave yourself open to hitting something less usual, maybe someone's blog, the Git site, some specialized StackExchange site, etc.

Citing Your Findings in Your Code

If what you find or learn is non-trivial in terms of helping you write your code, you must cite the source of your finding in your source code.  This is very much like citing your sources in a paper or essay that your write for class (or publish to the world).  Citing your source has two functions.  One, you are avoiding an academic integrity violation.  Taking someone else's work without acknowledgment is an academic integrity violation (so is borrowing from unapproved sources, see the Academic Integrity statement at the bottom of the main syllabus page for details). Two, if solving your coding problem required an internet search, then it's somewhat obscure and/or complicated.  Someone may need to understand the rationale behind your code, e.g., editing this code in the future (in the next milestone).  Citing your source is a concise and precise way to help.  Some additional words of explanation of your own would be a good idea, too.

What should you put in a citation?  (a) The link, (b) the title of the link, (c) the date captured (because the document might change after capture), and (d) how the source was used: just for information,  or copying of code.  Regarding the last, again, please see the Academic Integrity statement at the bottom of the main syllabus page for details on what's allowed (the copyright has to permit copying).  Generally, don't copy: learn from the code and write your own code.  Another thing to include in your comment is  your initials or Git handle so that a teammate can quickly track you down for additional details.  You should also include your initials or Git handle in the comment so that a teammate can quickly track you down for additional details.

Happy searching!

Further Reading

Eric Raymond, How to Ask Questions the Smart Way.

Piazza Best Practices