development interview questions
Top development frequently asked interview questions
I've wanted to write a GTK+ version of Unity Dash for some time. I think it could be useful for Xfce, Gnome Flashback, elementaryOS, etc.
Before I start doing anything about it, I'd like to know if there are any high-level libraries to search Scopes, use filters, etc. A GIR-lib would be very nice.
Does anything like this exist, or am I going to have to do all the dbus stuff myself?
Source: (StackOverflow)
I'd like to make a theme from scratch for Unity.
What knowledge and information/skills are needed? Are there any tools or templates out there for something like this already? I don't have any Python experience so tools biased towards beginners are preferable.
Source: (StackOverflow)
Once in a while I need to install a new Ubuntu (I used it both for desktop and servers) and I always forget a couple of libraries I should have installed before compiling, meaning I have to recompile, and it's getting annoying.
So now I want to make a complete list of all library packages to install before compiling Python (and preferably how optional they are).
This is the list I compiled with below help and by digging in setup.py
. It is complete for Ubuntu 10.04 and 11.04 at least:
build-essential (obviously)
libz-dev (also pretty common and essential)
libreadline-dev (or the Python prompt is crap)
libncursesw5-dev
libssl-dev
libgdbm-dev
libsqlite3-dev
libbz2-dev
For Python 3.2 and later:
liblzma-dev
More optional:
tk-dev
libdb-dev
Ubuntu has no packages for v1.8.5 of the Berkeley database, nor (for obvious reasons) the Sun audio hardware, so the bsddb185
and sunaudiodev
modules will still not be built on Ubuntu, but all other modules are built with the above packages installed.
UPDATE
There are in Ubuntu 14.04 even more patches needed for Python 2.6, and 2.7 etc. I would recommend to instead checkout pyenv. It contains a script python-build
(located in plugins/python-build/bin
). With it you can install arbitrary Python versions like this:
$ ./python-build 2.7.8 /opt/python27
Where 2.7.8 is the version and /opt/python27 is the path it will be installed. Pyenv will download the Python version, apply the necessary patches and configure; make; make install
for you.
END UPDATE
Python 2.5 and Python 2.6 also needs to have LDFLAGS set on Ubuntu 11.04 and later, to handle the new multi-arch layout:
export LDFLAGS="-L/usr/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
For Python 2.6, 2.7 and 3.0 you also need to explicitly enable SSL after running the ./configure
script and before running make
. In Modules/Setup
there are lines like this:
#SSL=/usr/local/ssl
#_ssl _ssl.c \
# -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
# -L$(SSL)/lib -lssl -lcrypto
Uncomment these lines and change the SSL variable to /usr
:
SSL=/usr
_ssl _ssl.c \
-DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \
-L$(SSL)/lib -lssl -lcrypto
Python 2.6 and 3.0 also needs Modules/_ssl.c modified to be used with OpenSSL 1.0, which is used in Ubuntu 11.10. At around line 300 you'll find this:
else if (proto_version == PY_SSL_VERSION_SSL3)
self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
else if (proto_version == PY_SSL_VERSION_SSL2)
self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
else if (proto_version == PY_SSL_VERSION_SSL23)
self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
Change that into:
else if (proto_version == PY_SSL_VERSION_SSL3)
self->ctx = SSL_CTX_new(SSLv3_method()); /* Set up context */
#ifndef OPENSSL_NO_SSL2
else if (proto_version == PY_SSL_VERSION_SSL2)
self->ctx = SSL_CTX_new(SSLv2_method()); /* Set up context */
#endif
else if (proto_version == PY_SSL_VERSION_SSL23)
self->ctx = SSL_CTX_new(SSLv23_method()); /* Set up context */
This disables SSL_v2 support, which apparently is gone in OpenSSL1.0.
Python 2.4 (yes, I still have some old projects that need 2.4) needs this patch to setup.py:
--- setup.py 2006-10-08 19:41:25.000000000 +0200
+++ setup.py 2012-05-08 14:02:14.325174357 +0200
@@ -269,6 +269,7 @@
lib_dirs = self.compiler.library_dirs + [
'/lib64', '/usr/lib64',
'/lib', '/usr/lib',
+ '/usr/lib/x86_64-linux-gnu'
]
inc_dirs = self.compiler.include_dirs + ['/usr/include']
exts = []
@@ -496,7 +497,8 @@
ssl_incs += krb5_h
ssl_libs = find_library_file(self.compiler, 'ssl',lib_dirs,
['/usr/local/ssl/lib',
- '/usr/contrib/ssl/lib/'
+ '/usr/contrib/ssl/lib/',
+ 'x86_64-linux-gnu'
] )
if (ssl_incs is not None and
And it needs to be compiled with:
env CPPFLAGS="-I/usr/lib/x86_64-linux-gnu" LDFLAGS="-L/usr/include/x86_64-linux-gnu" ./configure --prefix=/opt/python2.4
Source: (StackOverflow)
What is the difference between upstream and downstream when referring to who (or where) to go to as a developer or packager?
Source: (StackOverflow)
What is the Ubuntu 16.03, 16.05, 15.11, etc? I was typing Ubuntu 16.04 and accidentally typed 16.03. I saw things like Ubuntu 16.03, 16.05, 16.01 on launchpad. They were milestones relating to the next Ubuntu release. What is this about?
Here is a link.
Source: (StackOverflow)
This question already has an answer here:
I've used Windows for many years, using Dreamweaver as my editor as it had a file tree which is based on a project (via Local, FTP or SFTP).
I need a web development IDE with the following functionality:
syntax highlighting for PHP, HTML, CSS, JavaScript
file tree - Local, FTP, SFTP, Project-Based (e.g. via the methods of Local/FTP/SFTP) in other words, like Dreamweaver
can open multiple files (tabbed)
Additionally, I wouldn't mind features like debugging, class listings, etc, as long as I can hide them away.
Source: (StackOverflow)
For those who are not MOTU (people who maintain the Universe and Multiverse software repositories) and do not have plans of the "I will apply to MOTU by $date" variety:
What keeps you and others like you from trying to become MOTU? What makes you think you couldn't become one?
I'm referring to both social and technological barriers.
EDIT:
I'm only saying MOTU because it's a pretty generic group, but "why aren't you packaging / patching and intending to eventually try for upload rights?" is an even more general version.
Source: (StackOverflow)
So, I installed the Android SDK, Eclipse, and the ADT. Upon firing up Eclipse the first time after setting up the ADT, this error popped up:
[2012-05-29 12:11:06 - adb] /home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] 'adb version' failed!
/home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] Failed to parse the output of 'adb version':
Standard Output was:
Error Output was:
/home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] /home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] 'adb version' failed!
/home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
[2012-05-29 12:11:06 - adb] Failed to parse the output of 'adb version':
Standard Output was:
Error Output was:
/home/drsmith/Downloads/android-sdk-linux/platform-tools/adb: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
I'm not quite sure how this is. Feels weird that there's a missing library there. I'm using Ubuntu 12.04. No adb is a pretty big blow as an Android developer. How do I fix?
Source: (StackOverflow)
The application in question does some action (here connecting audio to network streams) and runs minimized if these actions were successful. Therefore a status icon is needed to display the state of the connection (e.g. CONNECTED/DISCONNECTED). Only when clicking the icon the application window will open to give access to further options.
Using Python 2.6 and pyGtk I conveniently realised this by using gtk_status_icon. I deliberately wrote the application to run on as many distributions as possible including the various Ubuntu versions. I took care to use possible dependencies only after the user had installed them.
However now I hear that gtk_status_icon will no longer be supported in future Ubuntu releases. Developers are asked to use Application Indicators instead. What is then best practise to make sure that:
- The application's local icons are displayed properly
- The application will still run and display it's icons in future Ubuntu releases.
- The application will also run and display it's icons in other environments where indicator-applet, libappindicator, and python-appindicator are not provided.
Application Indicator fallback mechanisms to gtk_status_icon won't work if indicator-applet is not running. Python interpreters will not run if there was no appindicator module to import from. Do I need to develop different versions for different distributions or is there a better way to come around this.
Where do I find a documentation on how to use ApplicationIndicator other than in the example given in Ubuntu Wiki? What commands are provided to check if indicator-applet is running to avoid programming different source codes for Ubuntu vs. non-Ubuntu distributions?
Source: (StackOverflow)
I am going to introduce Ubuntu to some new users (students in this case). Usually, I talk about the history of Ubuntu, how Ubuntu started, who has built Ubuntu in the past, and who decides the road Ubuntu takes.
Of course, you can't talk about the history of Ubuntu without mentioning Mark Shuttleworth. I would quite like to have a question on Ask Ubuntu to point new users to, so this is it!
Who is Mark Shuttleworth, and how is he related to Ubuntu?
Source: (StackOverflow)
I'm currently reviewing bus on Launchpad and the option to Triage them is greyed out for me. Is this because my Karma is not high enough (599 at time of writing) or is it because I'm not a part of the correct team (I'm working on papercuts).
Source: (StackOverflow)
This question already has an answer here:
I would like to know how to create one of those lenses for unity. I know how to program. but I don't know where to start. Are there certain libraries I should use or docs that I should read? Are there wiki pages that I can reference?
My google-fu has so far failed me.
Source: (StackOverflow)
I'm an avid developer but I never actually gotten around to setting up my own PPA - how would someone go about this? Common issues encountered? How do I get my source code to be compiled into packages on the PPA?
Source: (StackOverflow)