Help me help myself

Hi all,

The goal of this email is to learn how to find answers using available
resources on my own in the future. To do this, I will explain what I’ve
done to try and find the answer and then I hope someone can tell me how
to
finish the process so that next time I can do it on my own.

I’m working through the details of the MM Timing Recovery block. In the
process of doing this I’ve come across the following line in source:

d_omega = d_omega_mid + gr::branchless_clip(d_omega-d_omega_mid,
d_omega_lim);

I don’t know what gr::branchless_clip does, so I started looking for
answers on google and the gnuradio API manual. In the manual, I find
this:

http://gnuradio.org/doc/doxygen/namespacegr.html#ace35e8c3e3ad45a5100217d2b6826e1b

but that doesn’t tell me what it does. I can’t find anymore reference to
branchless_clip then this.

From the source code, I don’t know how to track down the reference. I’ve
searched my laptop for branchless_clip, but I get no returns.

So the question is, how do I find what branchless_clip does in the MM
Timing Recovery block? I care more about the “how do I find” part of the
question then the actual answer, though I do want the actual answer.

Thanks,
Rich

On 12/22/2014 06:37 PM, Richard B. wrote:

d_omega = d_omega_mid + gr::branchless_clip(d_omega-d_omega_mid,
From the source code, I don’t know how to track down the reference.
I’ve searched my laptop for branchless_clip, but I get no returns.

So the question is, how do I find what branchless_clip does in the MM
Timing Recovery block? I care more about the “how do I find” part of
the question then the actual answer, though I do want the actual answer.

I used the following “find” command:

find gnuradio -name “.” -exec grep -H branchless_clip ‘{}’ ‘;’

And found the definition in:

gnuradio/gnuradio-runtime/include/gnuradio/math.h:
branchless_clip(float x, float clip)


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

On 12/22/2014 06:42 PM, Marcus D. Leech wrote:

but that doesn’t tell me what it does. I can’t find anymore reference

find gnuradio -name “.” -exec grep -H branchless_clip ‘{}’ ‘;’

And found the definition in:

gnuradio/gnuradio-runtime/include/gnuradio/math.h:
branchless_clip(float x, float clip)

I’m not as smart as Marcus, so I googled “branchless clip”,

Philip

On 12/22/2014 06:45 PM, Philip B. wrote:

On 12/22/2014 06:42 PM, Marcus D. Leech wrote:

I’m not as smart as Marcus, so I googled “branchless clip”,

Philip
I think that at the end of the day, questions like this boil down to
“how do I get comfortable with the tools of the trade in software
development”.

That’s not something that the Gnu Radio community can economically
address.


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

Hi Richard,

actually, I kind of liked your question and the answers you’ve got :slight_smile:
As a community, it’s always kind of hard to know where people actually
encounter obstacles, and you’re exactly the kind of future user we’d
like to address: Able and willing to solve one’s own problems, but not
to shy to ask questions on how to do stuff. Also, you don’t seem to be a
complete stranger to the concepts of GNU Radio, so yours is an
interesting angle.

Being part of the GNU Radio development easily makes one blind to the
problems “normal people” have when getting into GNU Radio. For example,
we’ve created a set of new guided tutorials, which I now habitually link
to [1], but they were written by people who “guess” what new users
should know based on the questions that get asked. And the questions
that actually get asked might be quite different from the questions new
users actually have. So we asked people to give their feedback on that
(please feel encouraged to do so, too!). This all illustrates what
Marcus L. concluded in “something that the GR community can’t
economically address”, and I sure hope you’ll feel motivated to find
your very own way through Software (defined radio) Development!

Keep up the good questions,

Greetings,
Marcus

[1] http://gnuradio.org/redmine/projects/gnuradio/wiki/Guided_Tutorials

Actually, your replies helped. I was not aware or in the mindset that
branchless_clip was a generally used method for clamping fixed or
floating
point values. Because of that, I was limiting my searches to gnuradio
related stuff (googling “gnuradio branchless_clip”). Now I know it is a
general method of doing something.

Helping people who are getting comfortable is a good thing to do. It
will
ensure they use the tools. There is a limit to this of course. No one
wants
to see basic level questions being asked all day.

MLeech I really understand where you’re coming from. But I think that’s
the
point of a community. If you are personally tired of answering low level
questions, then you should not feel like you have to. Others in the
community might be happy to do it, and you can stick to the advanced
questions. Correct me if I’m wrong, but this is how other communities
seem
to work that I’ve been involved with.

MMuller, thank you. I do my best to help myself before I ask a question
here. Often, I feel like I’m asking a legit question, until the
responses
make me feel like i just asked the equivalent of “what does 2+2 equal?”
Its
always hard until you ask. Shrug.

Rich

On 12/22/2014 06:59 PM, Richard B. wrote:

Actually, your replies helped. I was not aware or in the mindset that
branchless_clip was a generally used method for clamping fixed or
floating point values. Because of that, I was limiting my searches to
gnuradio related stuff (googling “gnuradio branchless_clip”). Now I
know it is a general method of doing something.

Helping people who are getting comfortable is a good thing to do. It
will ensure they use the tools. There is a limit to this of course. No
one wants to see basic level questions being asked all day.
I’ve been on this mailing list for, gosh, a decade?

In that time, what I’ve noticed is that in the last couple of years,
there’s a significant fraction of folks who are encountering not only
Gnu Radio and
SDR/DSP for the first time, but software development in general.
I’m not sure why that is, but I’m pretty sure that the list isn’t, in
general, well-equipped to deal with that kind of thing.

My own patience for that type of thing varies considerably, and I try to
avoid giving any answers at all when my patience is perhaps not as
generous as it should be, and try to give cheerful answers when
possible.

I certainly don’t want people to leave with the impression that we’re
unhelpful here, but on the other hand, I don’t think it would be good
for
the list (and the community) if we became a “free CS101 course” for
the huddled masses. Just my opinion…

…funny anecdote time.

I once helped run an internal help-desk doing Unix technical support
within the Nortel empire. We’d assembled a team of
pretty-darned-competent people to do front-line support. Vastly
better than your typical help-desk. Like, could debug shell scripts
for customers while waiting on the phone. So, we got a bit of a
reputation of being pretty-much the best at what we did. To the extent
that our phone number leaked out into the greater world, and we
started getting support calls from random not-Nortel places, which
we obviously couldn’t support, since it wasn’t our mandate.

Sometimes, I think we do that here…

On 12/22/2014 07:31 PM, Richard B. wrote:

does 2+2 equal?" Its always hard until you ask. Shrug.

Rich
Richard:

I certainly didn’t mean to imply that you’d asked a “stupid question”.
There aren’t any stupid questions. Only stupid/ill-considered answers.

Your post just triggered one of my many soap-box moments. If I had a
beard, it would be grey. Think of me as the grumpy old greybeard
muttering incoherently over there in the corner…


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium

Use cscope and/or ctags next time

On 12/23/2014 12:42 AM, Marcus D. Leech wrote:

I used the following “find” command:

find gnuradio -name “.” -exec grep -H branchless_clip ‘{}’ ‘;’

A nice tool for searching source trees is ‘ack’: http://beyondgrep.com/

It also has a vim plugin.

Cheers,
M

On 12/23/2014 12:59 AM, Richard B. wrote:

Actually, your replies helped. I was not aware or in the mindset that
branchless_clip was a generally used method for clamping fixed or
floating point values. Because of that, I was limiting my searches to
gnuradio related stuff (googling “gnuradio branchless_clip”). Now I know
it is a general method of doing something.

Helping people who are getting comfortable is a good thing to do. It
will ensure they use the tools. There is a limit to this of course. No
one wants to see basic level questions being asked all day.

Hey Richard,

you’re in a very interesting spot where you’re learning all these
things. This is a great time to write stuff down, amend the wiki etc. It
would be a help to other people getting started if you added to the
docs.

And welcome to the community,
M

On Mon, Dec 22, 2014 at 6:59 PM, Richard B. [email protected]
wrote:

Actually, your replies helped. I was not aware or in the mindset that
branchless_clip was a generally used method for clamping fixed or floating
point values. Because of that, I was limiting my searches to gnuradio
related stuff (googling “gnuradio branchless_clip”). Now I know it is a
general method of doing something.

Helping people who are getting comfortable is a good thing to do. It will
ensure they use the tools. There is a limit to this of course. No one wants
to see basic level questions being asked all day.

Another thing you can always do is create a simple test project to call
a
function or block that you don’t understand and see what outputs
different
kinds of inputs produce. It can be a pain to do this kind of thing,
especially with a C++ project where the basic setup is more complicated
than a simple Python script, but it’s good education anyways.

Also, to re-up Marin’s comment, when you’ve run into these situations
where
the documentation on something like this is lacking, please feel free to
submit patches with better docs to help explain it to others.

Tom