
Show HN: My first Android App – order-taker for family company that sells wood - maherdeeb
https://github.com/MaherDeeb/take_orders_app
======
maherdeeb
Motivation:

My family owns a company that sells sawn wood and plywood products. Although I
am currently not engaged in its business, I am very interested in finding out
how the family business does. Moreover, I would like to put data-driven
options on the table to improve the company in the future. The company is
still following the 19th-century best practice. The workers handwrite all
invoices, and technology has no role in making decisions. Besides that, there
is no clear strategy about passing experience to the next generation. I want
to change that by creating a pipeline that makes transferring data,
experience, and insight happened near real-time.

Design:

I am very interested in the community's feedback regarding my App and code
design:

I used activities instead of fragments. I had the feeling that the fragment
was not the best option because the navigation plan can be too complex. am I
right?

I used a class to initiate my data classes and share them between different
activities instead of using the intent to share data. Do you think my option
was correct and what could be the best practice for sharing data classes
between activities?

When choosing the products, I used only a single activity and used code to
change the design of the activity. I thought it that can be faster than using
many activities and keep the download size smaller. Does it make sense?

For more info you can check the demo here:
[https://www.youtube.com/watch?v=8MdLv3h-j-o](https://www.youtube.com/watch?v=8MdLv3h-j-o)

My background:

I am a Data Scientist, and I come from Python World. My programming experience
is good enough to tackle advanced challenges especially in the case of Machine
Learning and Deep Learning. As a problem solver, I enjoy utilizing all
possible resources to come up with a valuable solution. I believe that DS
people can perform better when they have the right communication channels with
developers and stockholders. That is why I am here.

If you have any questions, suggestions, or feedback, I would be happy to
answer.

~~~
Benjammer
I didn't dig too deeply into the code itself and the logic flows, but at a
very high level I could start with some project organization feedback that
might make your life easier down the road:

\- You don't have to use a Navigation Component in order to use Fragments. You
can still use a single-activity model that just manually calls the fragment
manager to make fragment transactions if your app is simple enough to not
require a full Navigation graph. The overall reduction in complexity with
single-activity are still very worth it, imo. Much easier to attach interfaces
than deal with activity results and scene transitions if you don't need to.

\- You don't have to just have one "app" module in your project. You don't
even have to call it "app." You can rename the module to whatever you want,
like "wood-client" or something more informative than "app." You could create
a second module called "wood-data", and then have all of your data classes
defined in separate files in a "model" package. I don't see much reason to
pack all your data classes into one file. Android Studio is a fully fledged
IDE built on IntelliJ IDEA with things like shift-shift search, and ctrl+o. no
reason to compact things into one file.

\- Speaking of packages, you should think better about your package naming
scheme. "com.example.woodinvoicetest" is messy to call it "example," and
confusing to call it "<something>test" when it's not actually a test code
package. A simple starting point could be something like
"com.woodinvoice.client," "com.woodinvoice.common," "com.woodinvoice.data,"
etc.

\- Don't worry about download size right now unless you are packaging a lot of
graphics content into your APK, like bitmaps and large icons or something.
This is a problem for future you to deal with, honestly. You don't have enough
workflows yet to worry about app size. You're not building a social/consumer
app, so user dropoff for a long download time doesn't mean anything to you
right now.

~~~
thetanuj
Having dealt with fragmentManager and supportFragmentManager a lot, I highly
recommend using Navigation Component. It may be confusing to set it up
initially, but once you do it, it makes navigation really easy to handle.

------
jessaustin
There probably aren't many sawyers on iPhone, but still I'm curious... at this
point in time, why not just a PWA for something like this? Even if the other
advantages are controversial, with a PWA you can use the same app on a desktop
that you use on a phone.

~~~
darkteflon
PWA:
[https://en.m.wikipedia.org/wiki/Progressive_web_application](https://en.m.wikipedia.org/wiki/Progressive_web_application)

------
maherdeeb
The App is used now by our workers in the wood warehouse to replace
handwriting invoices. There is no online market place here. As a manager, if I
want to know how the business does, I need to call the sales team at the
warehouse and have a conversation for about 15 min, and I get no data to
analyze. With this App, I am now getting near real-time info about the
business without interrupting the workers and the sales team. The App is not
for customers. The App is similar to the App that the waitress uses at the
restaurant to take orders. The App can be adjusted to fit any other similar
business field.

~~~
eximius
Maybe adjust the tagline to be something to be 'internal' or 'order tracker'
to clear up the confusion?

What learning resources did you use when building this? Personally whenever
I've looked at building an app, I find the concepts for layout and
communication entirely opaque and unintuitive.

~~~
maherdeeb
Thanks for the suggestion! I started with the Udacity course: Developing
Android Apps with Kotlin. However, that was not enough. I knew exactly what I
want to solve. I was facing specific problems so it was easier to google those
problems and find the answers than following a course. I am not a good
designer. I tried to make the design as right and as simple as the solution
needs.

------
httpsterio
Not to be a Debbie downer but design wise it has issues both aesthetically and
in its flow. It's hard to gauge the overall status in the order processing and
functionality isn't presented in an easy to understand way. On top of that,
the visual look is very dated and not very appealing. Both are relatively easy
to fix and I can expand on the issues if you wish?

~~~
mfkp
I was going to say, what version of Android is the demo video running? It
looks like it's the Android design from 5 years ago. Definitely could use some
UI enhancements.

~~~
maherdeeb
That is a good point! Our workers have Android phones which are at least 6
years old. Later after the test period, I am planning to provide them with a
tablet specifically for running this App.

------
tananaev
Nowadays it's recommended to use Fragments instead of Activities, but it's
kind of controversial topic.

It looks like you have some hardcoded data. I would move that to resources.
You can use some kind of JSON or XML format to store that.

Another thing I would do is split classes into packages. Usually you would
have one for UI layer, one for data layer etc.

~~~
maherdeeb
Thanks for your feedback. I tried to use data classes in Kotlin to remove
hardcoded data from the main code. In Python, this is easy and very useful.
Splitting the classes was confusing. I am sure I am going to make it better in
my next App.

------
mysticllama
i think it's awesome that you solved a problem yourself and learned something
new. to me, it makes sense that you built a native android app given the use-
case you're describing -- offline, mobile, low-cost devices needed in
industrial setting, etc. best of luck!

------
SergeAx
That's a nice pet project, congrats with HN 1st page) Out of curiosity: was it
really nesessary to build a mobile app, what are the benefits compared to web-
app?

~~~
maherdeeb
The offline app is a better option than a web app since the internet can
sometimes be a major problem. With this app, the workers can send the invoices
to the server manually later if there was no internet at the moment of
recording the invoice.

------
frequentnapper
Congrats on solving your internal business problem. I did something similar
for a company I worked for but using windows toughbook devices. BTW, what beer
is that?

~~~
maherdeeb
Thanks a lot! it is Bruges-Belgium beer :) I recommend it.

------
smckk
Great job. I am learning to build apps in android. Currently most of the
tutorials and even books I come across have quite small examples to follow,
usually 2 activity files and 2 layout files. Honestly, the progress to
building a substantial app is a bit slow because the projects are so small.

This is an open question to all.

I want to know how you made the jump to 10+(activity and layout) files in a
project, what resources lead you to getting to this level?

------
jamil7
Cool to see someone’s first Android app and approach. I’ve been building
hybrid app with Jetpack compose and SwiftUI. It’s also my first Android app
and I was a bit surprised to see how many different ways there are to do one
thing and how many are outdated compared to iOS. Compose is pre alpha and
nowhere near ready for production but you can see the potential it has, there
are rumours from the Android team about work already done that lets it run on
other platforms. You can guess which one it likely is.

------
fblp
Hey there, i do a lot of work with wood and material suppliers who may be
interested in this as you develop further. How can i contact you?

~~~
maherdeeb
Thanks! via Email or LinkedIn

------
stockkid
Congrats on shipping and thanks for sharing the code. What makes you open
source it?

~~~
maherdeeb
The App can be adjusted very quickly to serve similar business fields. You
need only to change the products and properties in the data classes and some
calculations logic. Of course, our real data is not open-sourced. I could not
find similar solutions in the market so I decided to take the initiative to
build one.

------
vmception
Given your use case for workers, instead of a ton of users and engagement, are
UI, UX and system design best practices useful for you?

This app doesn't use most of them, and I was curious if it mattered.

~~~
maherdeeb
you are right! I used try and error with the workers. I kept in touch with
them from the beginning. Besides that, I worked there during the summer break
when I was a bachelor student. I have an idea of how stuff works there.

------
NonEUCitizen
Some screenshots on the github page would be nice.

------
cheez
This should be a web app

~~~
javieranton
I once showed my offline repository app to an employer during an interview and
got the same comment. My brain struggled to try to explain the meaning of the
word 'offline'

~~~
cheez
I've written "offline first" web pages, not sure exactly what your offline app
requires though.

------
joe_the_user
I would never download an app just to buy stuff from a random company, even a
local company I'd use (and live in a rural area now, person-to-person contact
matters, I'm bought meat from local ranches, etc). Why should I fill up my
phone's memory with such things? Why should I run someone's buggy and possibly
malicious code on my personal machine?

Why build an "app" when you could build a website?

Is this just an exercise to give you experience? I couldn't fault the urge
with everyone wanting to be employable and all but apps as substitute websites
is kind of problematic thing. Most of what we're talking about is nearly
static data, stuff that used to be on brochures.

~~~
morsch
That was my first thought as well, but I figured there must be something more
to it and there is: this appears to be an application for the employees of the
company use.

 _An android app that the workers use to collect orders from the customers.
After confirming the payment, the App sends the data to the remote server._

So customers aren't meant to install this app. Though, honestly, looking at
the video, it still seems like a website could do the same job. Maybe they
need it to work offline (and are not aware of/don't want to bother with the
web tech that tries to deal with that).

~~~
maherdeeb
The problem is that the workers are not sitting in front of the computer. They
are moving around inside the warehouse with the customers. For them using a
phone or tablet can be the best for them. Therefore, I chose to build an App
that is simple but productive.

------
mciancia
Uh, why something like that is on front page?

~~~
dang
I put it in HN's second-chance pool
([https://news.ycombinator.com/item?id=11662380](https://news.ycombinator.com/item?id=11662380))
after inviting maherdeeb to expand his comment. HN readers like stories about
real-world businesses, and like hearing about places that run on old
technology and could benefit from software. The family business angle is
interesting, and it doesn't get much more real-world than selling wood. Also,
Show HN is a great place to share one's work, including as a beginner, and the
community here likes providing advice and mentorship to people who are
learning. (Edit: for a fine example see
[https://news.ycombinator.com/item?id=23484429](https://news.ycombinator.com/item?id=23484429)
in this thread.)

When we put a submission in the second-chance pool, it gets a random placement
on the front page. If we guess wrong about what people will find interesting,
it soon falls off. This one has gotten quite a few upvotes already, though, so
my guess is that I guessed right, at least for some! If you don't think it's
interesting, that's fine—nothing interests everyone—but please don't post
unsubstantive comments about it, especially not in Show HN threads. Those have
special rules
([https://news.ycombinator.com/showhn.html](https://news.ycombinator.com/showhn.html)),
because sharing one's work on the internet puts a person in a vulnerable
position.

Instead, simply look at some of the other things there are to read here. If
you run out, I recommend the 'past' link in the top bar. It will take you back
to the major threads of recent, and not so recent, days.

Edit: there's actually another reason why this is interesting: it's
unpredictable. The best things on HN are the ones that you can't predict from
any existing sequence
([https://hn.algolia.com/?dateRange=all&page=0&prefix=true&que...](https://hn.algolia.com/?dateRange=all&page=0&prefix=true&query=by%3Adang%20can%27t%20predict%20from%20sequence&sort=byDate&type=comment)).
I'd say "my family has a business selling wood products which still operates
on hand-written invoices, and I decided to learn Android programming by
writing some software to try to help with that" is on the one hand a classic
HN story, yet on the other hand has elements that are quite uncorrelated. A
good mix of familiar and unfamiliar makes for a satisfying HN story.

~~~
shermanmccoy
> HN readers like stories about real-world businesses,

Yes! This was more interesting to me than, for example, some dross about GPT3
generated poetry. Thank you.

